pidgin/gtkdebug.c

branch
cpw.qulogic.gtk3
changeset 32414
8c5d1edf9da2
parent 31294
73607ab89c6f
parent 32394
f883709bdba4
child 32438
dc8991868906
child 33132
24afd2b22579
equal deleted inserted replaced
31341:d67ed5e5c721 32414:8c5d1edf9da2
126 } 126 }
127 127
128 static gboolean 128 static gboolean
129 configure_cb(GtkWidget *w, GdkEventConfigure *event, DebugWindow *win) 129 configure_cb(GtkWidget *w, GdkEventConfigure *event, DebugWindow *win)
130 { 130 {
131 if (GTK_WIDGET_VISIBLE(w)) { 131 if (gtk_widget_get_visible(w)) {
132 purple_prefs_set_int(PIDGIN_PREFS_ROOT "/debug/width", event->width); 132 purple_prefs_set_int(PIDGIN_PREFS_ROOT "/debug/width", event->width);
133 purple_prefs_set_int(PIDGIN_PREFS_ROOT "/debug/height", event->height); 133 purple_prefs_set_int(PIDGIN_PREFS_ROOT "/debug/height", event->height);
134 } 134 }
135 135
136 return FALSE; 136 return FALSE;
620 regex_compile(win); 620 regex_compile(win);
621 } 621 }
622 622
623 static void 623 static void
624 regex_key_release_cb(GtkWidget *w, GdkEventKey *e, DebugWindow *win) { 624 regex_key_release_cb(GtkWidget *w, GdkEventKey *e, DebugWindow *win) {
625 if(e->keyval == GDK_Return && 625 if(e->keyval == GDK_KEY_Return &&
626 GTK_WIDGET_IS_SENSITIVE(win->filter) && 626 gtk_widget_is_sensitive(win->filter) &&
627 !gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(win->filter))) 627 !gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(win->filter)))
628 { 628 {
629 gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(win->filter), TRUE); 629 gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(win->filter), TRUE);
630 } 630 }
631 } 631 }
923 923
924 item = gtk_tool_item_new(); 924 item = gtk_tool_item_new();
925 gtk_container_add(GTK_CONTAINER(item), gtk_label_new(_("Level "))); 925 gtk_container_add(GTK_CONTAINER(item), gtk_label_new(_("Level ")));
926 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); 926 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item));
927 927
928 win->filterlevel = gtk_combo_box_new_text(); 928 win->filterlevel = gtk_combo_box_text_new();
929 item = gtk_tool_item_new(); 929 item = gtk_tool_item_new();
930 #if GTK_CHECK_VERSION(2,12,0) 930 #if GTK_CHECK_VERSION(2,12,0)
931 gtk_widget_set_tooltip_text(win->filterlevel, _("Select the debug filter level.")); 931 gtk_widget_set_tooltip_text(win->filterlevel, _("Select the debug filter level."));
932 #else 932 #else
933 gtk_tooltips_set_tip(tooltips, win->filterlevel, _("Select the debug filter level."), NULL); 933 gtk_tooltips_set_tip(tooltips, win->filterlevel, _("Select the debug filter level."), NULL);
934 #endif 934 #endif
935 gtk_container_add(GTK_CONTAINER(item), win->filterlevel); 935 gtk_container_add(GTK_CONTAINER(item), win->filterlevel);
936 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item)); 936 gtk_container_add(GTK_CONTAINER(toolbar), GTK_WIDGET(item));
937 937
938 gtk_combo_box_append_text(GTK_COMBO_BOX(win->filterlevel), _("All")); 938 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("All"));
939 gtk_combo_box_append_text(GTK_COMBO_BOX(win->filterlevel), _("Misc")); 939 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Misc"));
940 gtk_combo_box_append_text(GTK_COMBO_BOX(win->filterlevel), _("Info")); 940 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Info"));
941 gtk_combo_box_append_text(GTK_COMBO_BOX(win->filterlevel), _("Warning")); 941 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Warning"));
942 gtk_combo_box_append_text(GTK_COMBO_BOX(win->filterlevel), _("Error ")); 942 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Error "));
943 gtk_combo_box_append_text(GTK_COMBO_BOX(win->filterlevel), _("Fatal Error")); 943 gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(win->filterlevel), _("Fatal Error"));
944 gtk_combo_box_set_active(GTK_COMBO_BOX(win->filterlevel), 944 gtk_combo_box_set_active(GTK_COMBO_BOX(win->filterlevel),
945 purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/filterlevel")); 945 purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/filterlevel"));
946 #ifdef USE_REGEX 946 #ifdef USE_REGEX
947 purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/debug/filterlevel", 947 purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/debug/filterlevel",
948 filter_level_pref_changed, win); 948 filter_level_pref_changed, win);

mercurial