equal
deleted
inserted
replaced
91 static int gtk2_pixbuf_height = 0; |
91 static int gtk2_pixbuf_height = 0; |
92 |
92 |
93 /* Static buffer for conversion from java.lang.String to UTF-8 */ |
93 /* Static buffer for conversion from java.lang.String to UTF-8 */ |
94 static char convertionBuffer[CONV_BUFFER_SIZE]; |
94 static char convertionBuffer[CONV_BUFFER_SIZE]; |
95 |
95 |
|
96 static gboolean new_combo = TRUE; |
96 const char ENV_PREFIX[] = "GTK_MODULES="; |
97 const char ENV_PREFIX[] = "GTK_MODULES="; |
97 |
98 |
98 /*******************/ |
99 /*******************/ |
99 enum GtkWidgetType |
100 enum GtkWidgetType |
100 { |
101 { |
606 |
607 |
607 fp_gtk_combo_box_entry_new = |
608 fp_gtk_combo_box_entry_new = |
608 dlsym(gtk2_libhandle, "gtk_combo_box_entry_new"); |
609 dlsym(gtk2_libhandle, "gtk_combo_box_entry_new"); |
609 if (fp_gtk_combo_box_entry_new == NULL) { |
610 if (fp_gtk_combo_box_entry_new == NULL) { |
610 fp_gtk_combo_box_entry_new = dl_symbol("gtk_combo_new"); |
611 fp_gtk_combo_box_entry_new = dl_symbol("gtk_combo_new"); |
|
612 new_combo = FALSE; |
611 } |
613 } |
612 |
614 |
613 fp_gtk_separator_tool_item_new = |
615 fp_gtk_separator_tool_item_new = |
614 dlsym(gtk2_libhandle, "gtk_separator_tool_item_new"); |
616 dlsym(gtk2_libhandle, "gtk_separator_tool_item_new"); |
615 if (fp_gtk_separator_tool_item_new == NULL) { |
617 if (fp_gtk_separator_tool_item_new == NULL) { |
1421 * in order to trick engines into thinking it's a real combobox |
1423 * in order to trick engines into thinking it's a real combobox |
1422 * arrow button/text field. |
1424 * arrow button/text field. |
1423 */ |
1425 */ |
1424 GtkWidget *combo = (*fp_gtk_combo_box_entry_new)(); |
1426 GtkWidget *combo = (*fp_gtk_combo_box_entry_new)(); |
1425 |
1427 |
1426 if (widget_type == COMBO_BOX_TEXT_FIELD) |
1428 if (new_combo && widget_type == COMBO_BOX_ARROW_BUTTON) { |
1427 (*fp_gtk_container_add)((GtkContainer *)combo, result); |
|
1428 else |
|
1429 { |
|
1430 (*fp_gtk_widget_set_parent)(result, combo); |
1429 (*fp_gtk_widget_set_parent)(result, combo); |
1431 ((GtkBin*)combo)->child = result; |
1430 ((GtkBin*)combo)->child = result; |
1432 } |
1431 } else { |
1433 |
1432 (*fp_gtk_container_add)((GtkContainer *)combo, result); |
|
1433 } |
1434 (*fp_gtk_container_add)((GtkContainer *)gtk2_fixed, combo); |
1434 (*fp_gtk_container_add)((GtkContainer *)gtk2_fixed, combo); |
1435 (*fp_gtk_widget_realize)(result); |
|
1436 return result; |
|
1437 } |
1435 } |
1438 else if (widget_type != TOOL_TIP && |
1436 else if (widget_type != TOOL_TIP && |
1439 widget_type != INTERNAL_FRAME && |
1437 widget_type != INTERNAL_FRAME && |
1440 widget_type != OPTION_PANE) |
1438 widget_type != OPTION_PANE) |
1441 { |
1439 { |