49 GtkWidget *eventbox = gtk_event_box_new(); |
50 GtkWidget *eventbox = gtk_event_box_new(); |
50 SCROLLEDWINDOW_SET_CHILD(scrolledwindow, eventbox); |
51 SCROLLEDWINDOW_SET_CHILD(scrolledwindow, eventbox); |
51 gtk_container_add(GTK_CONTAINER(eventbox), image); |
52 gtk_container_add(GTK_CONTAINER(eventbox), image); |
52 #else |
53 #else |
53 SCROLLEDWINDOW_SET_CHILD(scrolledwindow, image); |
54 SCROLLEDWINDOW_SET_CHILD(scrolledwindow, image); |
|
55 GtkWidget *eventbox = image; |
54 #endif |
56 #endif |
55 |
57 |
56 UI_APPLY_LAYOUT1(current, args); |
58 UI_APPLY_LAYOUT1(current, args); |
57 current->container->add(current->container, scrolledwindow, TRUE); |
59 current->container->add(current->container, scrolledwindow, TRUE); |
58 |
60 |
66 if(value->value && value->type && !strcmp(value->type, UI_IMAGE_OBJECT_TYPE)) { |
68 if(value->value && value->type && !strcmp(value->type, UI_IMAGE_OBJECT_TYPE)) { |
67 GdkPixbuf *pixbuf = value->value; |
69 GdkPixbuf *pixbuf = value->value; |
68 value->value = NULL; |
70 value->value = NULL; |
69 ui_imageviewer_set(value, pixbuf, UI_IMAGE_OBJECT_TYPE); |
71 ui_imageviewer_set(value, pixbuf, UI_IMAGE_OBJECT_TYPE); |
70 } |
72 } |
|
73 } |
|
74 |
|
75 if(args.contextmenu) { |
|
76 UIMENU menu = ui_contextmenu_create(args.contextmenu, obj, eventbox); |
|
77 ui_widget_set_contextmenu(eventbox, menu); |
71 } |
78 } |
72 |
79 |
73 return scrolledwindow; |
80 return scrolledwindow; |
74 } |
81 } |
75 |
82 |