| 301 gconstpointer val, gpointer data) |
301 gconstpointer val, gpointer data) |
| 302 { |
302 { |
| 303 PidginDebugWindow *win = (PidginDebugWindow *)data; |
303 PidginDebugWindow *win = (PidginDebugWindow *)data; |
| 304 const gchar *exp = (const gchar *)val; |
304 const gchar *exp = (const gchar *)val; |
| 305 |
305 |
| 306 gtk_entry_set_text(GTK_ENTRY(win->expression), exp); |
306 gtk_editable_set_text(GTK_EDITABLE(win->expression), exp); |
| 307 } |
307 } |
| 308 |
308 |
| 309 static void |
309 static void |
| 310 regex_pref_invert_cb(const gchar *name, PurplePrefType type, |
310 regex_pref_invert_cb(const gchar *name, PurplePrefType type, |
| 311 gconstpointer val, gpointer data) |
311 gconstpointer val, gpointer data) |
| 339 if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(win->filter))) { |
339 if (gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(win->filter))) { |
| 340 gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(win->filter), |
340 gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(win->filter), |
| 341 FALSE); |
341 FALSE); |
| 342 } |
342 } |
| 343 |
343 |
| 344 text = gtk_entry_get_text(GTK_ENTRY(win->expression)); |
344 text = gtk_editable_get_text(GTK_EDITABLE(win->expression)); |
| 345 purple_prefs_set_string(PIDGIN_PREFS_ROOT "/debug/regex", text); |
345 purple_prefs_set_string(PIDGIN_PREFS_ROOT "/debug/regex", text); |
| 346 |
346 |
| 347 if (text == NULL || *text == '\0') { |
347 if (text == NULL || *text == '\0') { |
| 348 regex_clear_color(win->expression); |
348 regex_clear_color(win->expression); |
| 349 gtk_widget_set_sensitive(win->filter, FALSE); |
349 gtk_widget_set_sensitive(win->filter, FALSE); |
| 571 context = gtk_widget_get_style_context(win->expression); |
571 context = gtk_widget_get_style_context(win->expression); |
| 572 gtk_style_context_add_provider(context, |
572 gtk_style_context_add_provider(context, |
| 573 GTK_STYLE_PROVIDER(filter_css), |
573 GTK_STYLE_PROVIDER(filter_css), |
| 574 GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); |
574 GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); |
| 575 |
575 |
| 576 gtk_entry_set_text(GTK_ENTRY(win->expression), |
576 gtk_editable_set_text(GTK_EDITABLE(win->expression), |
| 577 purple_prefs_get_string(PIDGIN_PREFS_ROOT "/debug/regex")); |
577 purple_prefs_get_string(PIDGIN_PREFS_ROOT "/debug/regex")); |
| 578 purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/debug/regex", |
578 purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/debug/regex", |
| 579 regex_pref_expression_cb, win); |
579 regex_pref_expression_cb, win); |
| 580 |
580 |
| 581 /* connect the rest of our pref callbacks */ |
581 /* connect the rest of our pref callbacks */ |
| 582 win->invert = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/invert"); |
582 win->invert = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/invert"); |