diff options
Diffstat (limited to 'src/fe-gtk')
-rw-r--r-- | src/fe-gtk/chanlist.c | 28 | ||||
-rw-r--r-- | src/fe-gtk/custom-list.c | 8 | ||||
-rw-r--r-- | src/fe-gtk/fe-gtk.c | 4 | ||||
-rw-r--r-- | src/fe-gtk/fe-gtk.h | 3 | ||||
-rw-r--r-- | src/fe-gtk/fkeys.c | 18 | ||||
-rw-r--r-- | src/fe-gtk/gtkutil.c | 11 | ||||
-rw-r--r-- | src/fe-gtk/gtkutil.h | 1 | ||||
-rw-r--r-- | src/fe-gtk/ignoregui.c | 2 | ||||
-rw-r--r-- | src/fe-gtk/maingui.c | 21 | ||||
-rw-r--r-- | src/fe-gtk/menu.c | 2 | ||||
-rw-r--r-- | src/fe-gtk/plugin-tray.c | 2 | ||||
-rw-r--r-- | src/fe-gtk/servlistgui.c | 12 | ||||
-rw-r--r-- | src/fe-gtk/setup.c | 18 | ||||
-rw-r--r-- | src/fe-gtk/sexy-spell-entry.c | 14 | ||||
-rw-r--r-- | src/fe-gtk/textgui.c | 8 | ||||
-rw-r--r-- | src/fe-gtk/xtext.c | 41 |
16 files changed, 93 insertions, 100 deletions
diff --git a/src/fe-gtk/chanlist.c b/src/fe-gtk/chanlist.c index bfd95c87..72e2c715 100644 --- a/src/fe-gtk/chanlist.c +++ b/src/fe-gtk/chanlist.c @@ -870,16 +870,15 @@ chanlist_opengui (server *serv, int do_refresh) wid = gtk_check_button_new_with_label (_("Channel name")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wid), TRUE); - gtk_signal_connect (GTK_OBJECT (wid), "toggled", - GTK_SIGNAL_FUNC - (chanlist_match_channel_button_toggled), serv); + g_signal_connect (G_OBJECT (wid), "toggled", + G_CALLBACK(chanlist_match_channel_button_toggled), serv); gtk_box_pack_start (GTK_BOX (hbox), wid, 0, 0, 0); gtk_widget_show (wid); wid = gtk_check_button_new_with_label (_("Topic")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wid), TRUE); - gtk_signal_connect (GTK_OBJECT (wid), "toggled", - GTK_SIGNAL_FUNC (chanlist_match_topic_button_toggled), + g_signal_connect (G_OBJECT (wid), "toggled", + G_CALLBACK (chanlist_match_topic_button_toggled), serv); gtk_box_pack_start (GTK_BOX (hbox), wid, 0, 0, 0); gtk_widget_show (wid); @@ -895,11 +894,11 @@ chanlist_opengui (server *serv, int do_refresh) GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0); gtk_widget_show (wid); - wid = gtk_combo_box_new_text (); - gtk_combo_box_append_text (GTK_COMBO_BOX (wid), _("Simple Search")); - gtk_combo_box_append_text (GTK_COMBO_BOX (wid), _("Pattern Match (Wildcards)")); + wid = gtk_combo_box_text_new (); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (wid), _("Simple Search")); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (wid), _("Pattern Match (Wildcards)")); #ifndef WIN32 - gtk_combo_box_append_text (GTK_COMBO_BOX (wid), _("Regular Expression")); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (wid), _("Regular Expression")); #endif gtk_combo_box_set_active (GTK_COMBO_BOX (wid), serv->gui->chanlist_search_type); gtk_table_attach (GTK_TABLE (table), wid, 1, 2, 1, 2, @@ -916,11 +915,12 @@ chanlist_opengui (server *serv, int do_refresh) GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0); gtk_widget_show (wid); - wid = gtk_entry_new_with_max_length (255); - gtk_signal_connect (GTK_OBJECT (wid), "changed", - GTK_SIGNAL_FUNC (chanlist_find_cb), serv); - gtk_signal_connect (GTK_OBJECT (wid), "activate", - GTK_SIGNAL_FUNC (chanlist_search_pressed), + wid = gtk_entry_new (); + gtk_entry_set_max_length (GTK_ENTRY(wid), 255); + g_signal_connect (G_OBJECT (wid), "changed", + G_CALLBACK (chanlist_find_cb), serv); + g_signal_connect (G_OBJECT (wid), "activate", + G_CALLBACK (chanlist_search_pressed), (gpointer) serv); gtk_table_attach (GTK_TABLE (table), wid, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 0, 0, 0); diff --git a/src/fe-gtk/custom-list.c b/src/fe-gtk/custom-list.c index ed292294..a954b4a0 100644 --- a/src/fe-gtk/custom-list.c +++ b/src/fe-gtk/custom-list.c @@ -87,7 +87,7 @@ static void custom_list_sortable_set_sort_func (GtkTreeSortable * sortable, gint sort_col_id, GtkTreeIterCompareFunc sort_func, gpointer user_data, - GtkDestroyNotify + GDestroyNotify destroy_func); static void custom_list_sortable_set_default_sort_func (GtkTreeSortable * @@ -95,7 +95,7 @@ static void custom_list_sortable_set_default_sort_func (GtkTreeSortable * GtkTreeIterCompareFunc sort_func, gpointer user_data, - GtkDestroyNotify + GDestroyNotify destroy_func); static gboolean custom_list_sortable_has_default_sort_func (GtkTreeSortable * @@ -601,7 +601,7 @@ custom_list_sortable_set_sort_func (GtkTreeSortable * sortable, gint sort_col_id, GtkTreeIterCompareFunc sort_func, gpointer user_data, - GtkDestroyNotify destroy_func) + GDestroyNotify destroy_func) { } @@ -609,7 +609,7 @@ static void custom_list_sortable_set_default_sort_func (GtkTreeSortable * sortable, GtkTreeIterCompareFunc sort_func, gpointer user_data, - GtkDestroyNotify destroy_func) + GDestroyNotify destroy_func) { } diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index e930cb1f..d00158d1 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -757,7 +757,7 @@ fe_set_lag (server *serv, int lag) if (sess->gui->lagometer) { gtk_progress_bar_set_fraction ((GtkProgressBar *) sess->gui->lagometer, per); - add_tip (gtk_widget_get_parent (sess->gui->lagometer), lagtip); + gtk_widget_set_tooltip_text (gtk_widget_get_parent (sess->gui->lagometer), lagtip); } if (sess->gui->laginfo) gtk_label_set_text ((GtkLabel *) sess->gui->laginfo, lagtext); @@ -803,7 +803,7 @@ fe_set_throttle (server *serv) if (sess->gui->throttlemeter) { gtk_progress_bar_set_fraction ((GtkProgressBar *) sess->gui->throttlemeter, per); - add_tip (gtk_widget_get_parent (sess->gui->throttlemeter), tip); + gtk_widget_set_tooltip_text (gtk_widget_get_parent (sess->gui->throttlemeter), tip); } if (sess->gui->throttleinfo) gtk_label_set_text ((GtkLabel *) sess->gui->throttleinfo, tbuf); diff --git a/src/fe-gtk/fe-gtk.h b/src/fe-gtk/fe-gtk.h index ddb3324e..4e519d9c 100644 --- a/src/fe-gtk/fe-gtk.h +++ b/src/fe-gtk/fe-gtk.h @@ -56,9 +56,6 @@ #include "banlist.h" -#undef gtk_signal_connect -#define gtk_signal_connect g_signal_connect - #define flag_c flag_wid[0] #define flag_n flag_wid[1] #define flag_r flag_wid[2] diff --git a/src/fe-gtk/fkeys.c b/src/fe-gtk/fkeys.c index bf21c452..270eb0df 100644 --- a/src/fe-gtk/fkeys.c +++ b/src/fe-gtk/fkeys.c @@ -586,8 +586,8 @@ key_dialog_make_toggle (char *label, void *callback, void *option, wid = gtk_check_button_new_with_label (label); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wid), 0); - gtk_signal_connect (GTK_OBJECT (wid), "toggled", - GTK_SIGNAL_FUNC (callback), option); + g_signal_connect (G_OBJECT (wid), "toggled", + G_CALLBACK (callback), option); gtk_box_pack_end (GTK_BOX (box), wid, 0, 0, 0); gtk_widget_show (wid); @@ -610,7 +610,7 @@ key_dialog_make_entry (char *label, char *act, void *callback, void *option, wid = gtk_entry_new (); if (act) { - gtk_signal_connect (GTK_OBJECT (wid), act, GTK_SIGNAL_FUNC (callback), + g_signal_connect (G_OBJECT (wid), act, G_CALLBACK (callback), option); } gtk_box_pack_start (GTK_BOX (hbox), wid, 0, 0, 0); @@ -744,13 +744,13 @@ key_dialog_show () gtk_box_pack_end (GTK_BOX (hbox), vbox2, 1, 1, 0); wid = gtk_button_new_with_label (_("Add New")); gtk_box_pack_start (GTK_BOX (vbox2), wid, 0, 0, 0); - gtk_signal_connect (GTK_OBJECT (wid), "clicked", - GTK_SIGNAL_FUNC (key_dialog_add_new), list); + g_signal_connect (G_OBJECT (wid), "clicked", + G_CALLBACK (key_dialog_add_new), list); gtk_widget_show (wid); wid = gtk_button_new_with_label (_("Delete")); gtk_box_pack_start (GTK_BOX (vbox2), wid, 0, 0, 0); - gtk_signal_connect (GTK_OBJECT (wid), "clicked", - GTK_SIGNAL_FUNC (key_dialog_delete), list); + g_signal_connect (G_OBJECT (wid), "clicked", + G_CALLBACK (key_dialog_delete), list); gtk_widget_show (wid); gtk_widget_show (vbox2); @@ -762,8 +762,8 @@ key_dialog_show () wid3 = gtk_menu_item_new_with_label (_(key_actions[i].name)); gtk_widget_show (wid3); gtk_menu_shell_append (GTK_MENU_SHELL (wid2), wid3); - gtk_signal_connect (GTK_OBJECT (wid3), "activate", - GTK_SIGNAL_FUNC (key_dialog_sel_act), + g_signal_connect (G_OBJECT (wid3), "activate", + G_CALLBACK (key_dialog_sel_act), GINT_TO_POINTER (i)); } diff --git a/src/fe-gtk/gtkutil.c b/src/fe-gtk/gtkutil.c index af6d3803..79b71233 100644 --- a/src/fe-gtk/gtkutil.c +++ b/src/fe-gtk/gtkutil.c @@ -450,7 +450,7 @@ gtkutil_button (GtkWidget *box, char *stock, char *tip, void *callback, G_CALLBACK (callback), userdata); gtk_widget_show (wid); if (tip) - add_tip (wid, tip); + gtk_widget_set_tooltip_text (wid, tip); return wid; } @@ -547,15 +547,6 @@ gtkutil_clist_multiple_selection (GtkWidget * clist, int ** rows, const int max_ } void -add_tip (GtkWidget * wid, char *text) -{ - static GtkTooltips *tip = NULL; - if (!tip) - tip = gtk_tooltips_new (); - gtk_tooltips_set_tip (tip, wid, text, 0); -} - -void show_and_unfocus (GtkWidget * wid) { gtk_widget_set_can_focus (wid, FALSE); diff --git a/src/fe-gtk/gtkutil.h b/src/fe-gtk/gtkutil.h index 2ecbe3c2..cd7d9e80 100644 --- a/src/fe-gtk/gtkutil.h +++ b/src/fe-gtk/gtkutil.h @@ -41,7 +41,6 @@ GtkWidget *gtkutil_clist_new (int columns, char *titles[], GtkWidget * box, int gtkutil_clist_selection (GtkWidget * clist); int gtkutil_clist_multiple_selection (GtkWidget * clist, int ** rows, const int max_rows); -void add_tip (GtkWidget * wid, char *text); void show_and_unfocus (GtkWidget * wid); void gtkutil_set_icon (GtkWidget *win); GtkWidget *gtkutil_window_new (char *title, char *role, int width, int height, int flags); diff --git a/src/fe-gtk/ignoregui.c b/src/fe-gtk/ignoregui.c index 60b09698..a30b8cd1 100644 --- a/src/fe-gtk/ignoregui.c +++ b/src/fe-gtk/ignoregui.c @@ -172,7 +172,7 @@ ignore_treeview_new (GtkWidget *box) for (col_id=0; (col = gtk_tree_view_get_column (GTK_TREE_VIEW (view), col_id)); col_id++) { - GList *list = gtk_tree_view_column_get_cell_renderers (col); + GList *list = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (col)); GList *tmp; for (tmp = list; tmp; tmp = tmp->next) diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 16425def..8e6bbfe3 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -692,17 +692,17 @@ mg_set_topic_tip (session *sess) { text = g_strdup_printf (_("Topic for %s is: %s"), sess->channel, sess->topic); - add_tip (sess->gui->topic_entry, text); + gtk_widget_set_tooltip_text (sess->gui->topic_entry, text); g_free (text); } else - add_tip (sess->gui->topic_entry, _("No topic is set")); + gtk_widget_set_tooltip_text (sess->gui->topic_entry, _("No topic is set")); break; default: if (gtk_entry_get_text (GTK_ENTRY (sess->gui->topic_entry)) && gtk_entry_get_text (GTK_ENTRY (sess->gui->topic_entry))[0]) - add_tip (sess->gui->topic_entry, (char *)gtk_entry_get_text (GTK_ENTRY (sess->gui->topic_entry))); + gtk_widget_set_tooltip_text (sess->gui->topic_entry, (char *)gtk_entry_get_text (GTK_ENTRY (sess->gui->topic_entry))); else - add_tip (sess->gui->topic_entry, NULL); + gtk_widget_set_tooltip_text (sess->gui->topic_entry, NULL); } } @@ -935,14 +935,14 @@ mg_populate (session *sess) gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (gui->lagometer), res->lag_value); if (res->lag_tip) - add_tip (gtk_widget_get_parent (sess->gui->lagometer), res->lag_tip); + gtk_widget_set_tooltip_text (gtk_widget_get_parent (sess->gui->lagometer), res->lag_tip); } if (gui->throttlemeter) { gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (gui->throttlemeter), res->queue_value); if (res->queue_tip) - add_tip (gtk_widget_get_parent (sess->gui->throttlemeter), res->queue_tip); + gtk_widget_set_tooltip_text (gtk_widget_get_parent (sess->gui->throttlemeter), res->queue_tip); } /* did this tab have a connecting graph? restore it.. */ @@ -1192,7 +1192,6 @@ mg_open_quit_dialog (gboolean minimize_button) gtk_window_set_title (GTK_WINDOW (dialog), _("Quit HexChat?")); gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent_window)); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); - gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); dialog_vbox1 = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); gtk_widget_show (dialog_vbox1); @@ -1994,7 +1993,7 @@ mg_create_flagbutton (char *tip, GtkWidget *box, char *face) wid = gtk_toggle_button_new_with_label (face); gtk_widget_set_size_request (wid, 18, 0); - add_tip (wid, tip); + gtk_widget_set_tooltip_text (wid, tip); gtk_box_pack_start (GTK_BOX (box), wid, 0, 0, 0); g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (mg_flagbutton_cb), face); @@ -2936,21 +2935,21 @@ mg_create_search(session *sess, GtkWidget *box) g_signal_connect (G_OBJECT (highlight), "toggled", G_CALLBACK (search_set_option), &prefs.hex_text_search_highlight_all); g_signal_connect (G_OBJECT (highlight), "toggled", G_CALLBACK (search_handle_refresh), sess); gtk_box_pack_start(GTK_BOX(gui->shbox), highlight, FALSE, FALSE, 0); - add_tip (highlight, _("Highlight all occurrences, and underline the current occurrence.")); + gtk_widget_set_tooltip_text (highlight, _("Highlight all occurrences, and underline the current occurrence.")); matchcase = gtk_check_button_new_with_mnemonic (_("Mat_ch case")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(matchcase), prefs.hex_text_search_case_match); gtk_widget_set_can_focus (matchcase, FALSE); g_signal_connect (G_OBJECT (matchcase), "toggled", G_CALLBACK (search_set_option), &prefs.hex_text_search_case_match); gtk_box_pack_start(GTK_BOX(gui->shbox), matchcase, FALSE, FALSE, 0); - add_tip (matchcase, _("Perform a case-sensitive search.")); + gtk_widget_set_tooltip_text (matchcase, _("Perform a case-sensitive search.")); regex = gtk_check_button_new_with_mnemonic (_("_Regex")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(regex), prefs.hex_text_search_regexp); gtk_widget_set_can_focus (regex, FALSE); g_signal_connect (G_OBJECT (regex), "toggled", G_CALLBACK (search_set_option), &prefs.hex_text_search_regexp); gtk_box_pack_start(GTK_BOX(gui->shbox), regex, FALSE, FALSE, 0); - add_tip (regex, _("Regard search string as a regular expression.")); + gtk_widget_set_tooltip_text (regex, _("Regard search string as a regular expression.")); } static void diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c index 7fa5424e..c8e5182c 100644 --- a/src/fe-gtk/menu.c +++ b/src/fe-gtk/menu.c @@ -1689,7 +1689,7 @@ menu_about (GtkWidget *wid, gpointer sess) #endif get_sys_str (0)); - gtk_about_dialog_set_name (dialog, DISPLAY_NAME); + gtk_about_dialog_set_program_name (dialog, DISPLAY_NAME); gtk_about_dialog_set_version (dialog, PACKAGE_VERSION); gtk_about_dialog_set_license (dialog, license); /* gtk3 can use GTK_LICENSE_GPL_2_0 */ gtk_about_dialog_set_website (dialog, "http://hexchat.github.io"); diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c index 1b93f193..911e804a 100644 --- a/src/fe-gtk/plugin-tray.c +++ b/src/fe-gtk/plugin-tray.c @@ -151,7 +151,7 @@ void fe_tray_set_tooltip (const char *text) { if (sticon) - gtk_status_icon_set_tooltip (sticon, text); + gtk_status_icon_set_tooltip_text (sticon, text); } void diff --git a/src/fe-gtk/servlistgui.c b/src/fe-gtk/servlistgui.c index f860a3e7..7a9ee8a1 100644 --- a/src/fe-gtk/servlistgui.c +++ b/src/fe-gtk/servlistgui.c @@ -1255,7 +1255,7 @@ servlist_create_entry (GtkWidget *table, char *labeltext, int row, gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); entry = gtk_entry_new (); - add_tip (entry, tip); + gtk_widget_set_tooltip_text (entry, tip); gtk_widget_show (entry); gtk_entry_set_text (GTK_ENTRY (entry), def ? def : ""); gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry); @@ -1573,7 +1573,7 @@ servlist_create_logintypecombo (GtkWidget *data) gtk_combo_box_set_active (GTK_COMBO_BOX (cb), servlist_get_login_desc_index (selected_net->logintype)); - add_tip (cb, _("The way you identify yourself to the server. For custom login methods use connect commands.")); + gtk_widget_set_tooltip_text (cb, _("The way you identify yourself to the server. For custom login methods use connect commands.")); g_signal_connect (G_OBJECT (GTK_BIN (cb)), "changed", G_CALLBACK (servlist_logintypecombo_cb), data); return cb; @@ -1682,7 +1682,7 @@ servlist_open_edit (GtkWidget *parent, ircnet *net) gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN); - add_tip (scrolledwindow5, _("%n=Nick name\n%p=Password\n%r=Real name\n%u=User name")); + gtk_widget_set_tooltip_text (scrolledwindow5, _("%n=Nick name\n%p=Password\n%r=Real name\n%u=User name")); /* Server Tree */ @@ -1804,7 +1804,7 @@ servlist_open_edit (GtkWidget *parent, ircnet *net) gtk_table_set_col_spacings (GTK_TABLE (table3), 8); check = servlist_create_check (0, !(net->flags & FLAG_CYCLE), table3, 0, 0, _("Connect to selected server only")); - add_tip (check, _("Don't cycle through all the servers when the connection fails.")); + gtk_widget_set_tooltip_text (check, _("Don't cycle through all the servers when the connection fails.")); servlist_create_check (3, net->flags & FLAG_AUTO_CONNECT, table3, 1, 0, _("Connect to this network automatically")); servlist_create_check (4, !(net->flags & FLAG_USE_PROXY), table3, 2, 0, _("Bypass proxy server")); check = servlist_create_check (2, net->flags & FLAG_USE_SSL, table3, 3, 0, _("Use SSL for all the servers on this network")); @@ -2103,7 +2103,7 @@ servlist_open_networks (void) gtk_widget_set_can_default (button_edit, TRUE); button_sort = gtk_button_new_with_mnemonic (_("_Sort")); - add_tip (button_sort, _("Sorts the network list in alphabetical order. " + gtk_widget_set_tooltip_text (button_sort, _("Sorts the network list in alphabetical order. " "Use SHIFT-UP and SHIFT-DOWN keys to move a row.")); g_signal_connect (G_OBJECT (button_sort), "clicked", G_CALLBACK (servlist_sort), 0); @@ -2112,7 +2112,7 @@ servlist_open_networks (void) gtk_widget_set_can_default (button_sort, TRUE); button_sort = gtk_button_new_with_mnemonic (_("_Favor")); - add_tip (button_sort, _("Mark or unmark this network as a favorite.")); + gtk_widget_set_tooltip_text (button_sort, _("Mark or unmark this network as a favorite.")); g_signal_connect (G_OBJECT (button_sort), "clicked", G_CALLBACK (servlist_favor), 0); gtk_widget_show (button_sort); diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 55de46fe..ed4a4d92 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -660,7 +660,7 @@ setup_create_3oggle (GtkWidget *tab, int row, const setting *set) gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); if (set->tooltip) { - add_tip (label, _(set->tooltip)); + gtk_widget_set_tooltip_text (label, _(set->tooltip)); } gtk_table_attach (GTK_TABLE (tab), label, 2, 3, row, row + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, LABEL_INDENT, 0); @@ -721,7 +721,7 @@ setup_create_toggleR (GtkWidget *tab, int row, const setting *set) g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (setup_toggle_cb), (gpointer)set); if (set->tooltip) - add_tip (wid, _(set->tooltip)); + gtk_widget_set_tooltip_text (wid, _(set->tooltip)); gtk_table_attach (GTK_TABLE (tab), wid, 4, 5, row, row + 1, GTK_EXPAND | GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0); } @@ -737,7 +737,7 @@ setup_create_toggleL (GtkWidget *tab, int row, const setting *set) g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (setup_toggle_cb), (gpointer)set); if (set->tooltip) - add_tip (wid, _(set->tooltip)); + gtk_widget_set_tooltip_text (wid, _(set->tooltip)); gtk_table_attach (GTK_TABLE (tab), wid, 2, row==6 ? 6 : 4, row, row + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, LABEL_INDENT, 0); @@ -756,7 +756,7 @@ setup_create_toggle (GtkWidget *box, int row, const setting *set) g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (setup_toggle_cb), (gpointer)set); if (set->tooltip) - add_tip (wid, _(set->tooltip)); + gtk_widget_set_tooltip_text (wid, _(set->tooltip)); gtk_box_pack_start (GTK_BOX (box), wid, 0, 0, 0); } #endif @@ -802,7 +802,7 @@ setup_create_spin (GtkWidget *table, int row, const setting *set) wid = gtk_spin_button_new_with_range (0, set->extra, 1); g_object_set_data (G_OBJECT (wid), "lbl", label); if (set->tooltip) - add_tip (wid, _(set->tooltip)); + gtk_widget_set_tooltip_text (wid, _(set->tooltip)); gtk_spin_button_set_value (GTK_SPIN_BUTTON (wid), setup_get_int (&setup_prefs, set)); g_signal_connect (G_OBJECT (wid), "value_changed", @@ -928,7 +928,7 @@ setup_create_radio (GtkWidget *table, int row, const setting *set) { wid = gtk_radio_button_new_with_mnemonic (group, _(text[i])); /*if (set->tooltip) - add_tip (wid, _(set->tooltip));*/ + gtk_widget_set_tooltip_text (wid, _(set->tooltip));*/ group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (wid)); gtk_container_add (GTK_CONTAINER (hbox), wid); if (i == setup_get_int (&setup_prefs, set)) @@ -1025,10 +1025,10 @@ setup_create_menu (GtkWidget *table, int row, const setting *set) gtk_table_attach (GTK_TABLE (table), wid, 2, 3, row, row + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, LABEL_INDENT, 0); - cbox = gtk_combo_box_new_text (); + cbox = gtk_combo_box_text_new (); for (i = 0; text[i]; i++) - gtk_combo_box_append_text (GTK_COMBO_BOX (cbox), _(text[i])); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (cbox), _(text[i])); gtk_combo_box_set_active (GTK_COMBO_BOX (cbox), setup_get_int (&setup_prefs, set) - set->extra); @@ -1188,7 +1188,7 @@ setup_create_entry (GtkWidget *table, int row, const setting *set) if (set->list) gtk_entry_set_visibility (GTK_ENTRY (wid), FALSE); if (set->tooltip) - add_tip (wid, _(set->tooltip)); + gtk_widget_set_tooltip_text (wid, _(set->tooltip)); gtk_entry_set_max_length (GTK_ENTRY (wid), set->extra - 1); gtk_entry_set_text (GTK_ENTRY (wid), setup_get_str (&setup_prefs, set)); g_signal_connect (G_OBJECT (wid), "changed", diff --git a/src/fe-gtk/sexy-spell-entry.c b/src/fe-gtk/sexy-spell-entry.c index 29eb1ff0..e7d54777 100644 --- a/src/fe-gtk/sexy-spell-entry.c +++ b/src/fe-gtk/sexy-spell-entry.c @@ -93,7 +93,7 @@ static void sexy_spell_entry_class_init(SexySpellEntryClass *klass); static void sexy_spell_entry_editable_init (GtkEditableClass *iface); static void sexy_spell_entry_init(SexySpellEntry *entry); static void sexy_spell_entry_finalize(GObject *obj); -static void sexy_spell_entry_destroy(GtkObject *obj); +static void sexy_spell_entry_destroy(GObject *obj); static gint sexy_spell_entry_expose(GtkWidget *widget, GdkEventExpose *event); static gint sexy_spell_entry_button_press(GtkWidget *widget, GdkEventButton *event); @@ -198,7 +198,7 @@ static void sexy_spell_entry_class_init(SexySpellEntryClass *klass) { GObjectClass *gobject_class; - GtkObjectClass *object_class; + GObjectClass *object_class; GtkWidgetClass *widget_class; initialize_enchant(); @@ -206,7 +206,7 @@ sexy_spell_entry_class_init(SexySpellEntryClass *klass) parent_class = g_type_class_peek_parent(klass); gobject_class = G_OBJECT_CLASS(klass); - object_class = GTK_OBJECT_CLASS(klass); + object_class = G_OBJECT_CLASS(klass); widget_class = GTK_WIDGET_CLASS(klass); if (have_enchant) @@ -214,7 +214,7 @@ sexy_spell_entry_class_init(SexySpellEntryClass *klass) gobject_class->finalize = sexy_spell_entry_finalize; - object_class->destroy = sexy_spell_entry_destroy; + object_class->dispose = sexy_spell_entry_destroy; widget_class->expose_event = sexy_spell_entry_expose; widget_class->button_press_event = sexy_spell_entry_button_press; @@ -783,10 +783,10 @@ sexy_spell_entry_finalize(GObject *obj) } static void -sexy_spell_entry_destroy(GtkObject *obj) +sexy_spell_entry_destroy(GObject *obj) { - if (GTK_OBJECT_CLASS(parent_class)->destroy) - GTK_OBJECT_CLASS(parent_class)->destroy(obj); + if (G_OBJECT_CLASS(parent_class)->dispose) + G_OBJECT_CLASS(parent_class)->dispose(obj); } /** diff --git a/src/fe-gtk/textgui.c b/src/fe-gtk/textgui.c index 14fae28e..74972fe0 100644 --- a/src/fe-gtk/textgui.c +++ b/src/fe-gtk/textgui.c @@ -384,7 +384,8 @@ pevent_dialog_show () pevent_dialog_twid = gtk_xtext_new (colors, 0); - pevent_dialog_entry = gtk_entry_new_with_max_length (255); + pevent_dialog_entry = gtk_entry_new (); + gtk_entry_set_max_length (GTK_ENTRY (pevent_dialog_entry), 255); g_signal_connect (G_OBJECT (pevent_dialog_entry), "activate", G_CALLBACK (pevent_dialog_update), pevent_dialog_twid); gtk_box_pack_start (GTK_BOX (bh), pevent_dialog_entry, 0, 0, 0); @@ -394,7 +395,6 @@ pevent_dialog_show () gtk_container_add (GTK_CONTAINER (bh), tbox); gtk_widget_show (tbox); - gtk_widget_set_usize (pevent_dialog_twid, 150, 20); gtk_container_add (GTK_CONTAINER (tbox), pevent_dialog_twid); gtk_xtext_set_font (GTK_XTEXT (pevent_dialog_twid), prefs.hex_text_font); @@ -418,8 +418,8 @@ pevent_dialog_show () gtk_box_pack_end (GTK_BOX (vbox), hbox, 0, 0, 2); /*wid = gtk_button_new_with_label (_("Save")); gtk_box_pack_end (GTK_BOX (hbox), wid, 0, 0, 0); - gtk_signal_connect (GTK_OBJECT (wid), "clicked", - GTK_SIGNAL_FUNC (pevent_save_cb), NULL); + g_signal_connect (G_OBJECT (wid), "clicked", + G_CALLBACK (pevent_save_cb), NULL); gtk_widget_show (wid);*/ gtkutil_button (hbox, GTK_STOCK_SAVE_AS, NULL, pevent_save_cb, (void *) 1, _("Save As...")); diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 6d785cbf..579ba9b5 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -67,6 +67,13 @@ /* force scrolling off */ #define dontscroll(buf) (buf)->last_pixel_pos = 0x7fffffff +extern void gtk_marshal_VOID__POINTER_POINTER (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + static GtkWidgetClass *parent_class = NULL; struct textentry @@ -511,7 +518,7 @@ gtk_xtext_new (GdkColor palette[], int separator) } static void -gtk_xtext_destroy (GtkObject * object) +gtk_xtext_destroy (GObject * object) { GtkXText *xtext = GTK_XTEXT (object); @@ -549,7 +556,7 @@ gtk_xtext_destroy (GtkObject * object) { g_signal_handlers_disconnect_matched (G_OBJECT (xtext->adj), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, xtext); - /* gtk_signal_disconnect_by_data (GTK_OBJECT (xtext->adj), xtext);*/ + /* gtk_signal_disconnect_by_data (G_OBJECT (xtext->adj), xtext);*/ g_object_unref (G_OBJECT (xtext->adj)); xtext->adj = NULL; } @@ -608,8 +615,8 @@ gtk_xtext_destroy (GtkObject * object) xtext->orig_buffer = NULL; } - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (*GTK_OBJECT_CLASS (parent_class)->destroy) (object); + if (G_OBJECT_CLASS (parent_class)->dispose) + (*G_OBJECT_CLASS (parent_class)->dispose) (object); } static void @@ -633,7 +640,7 @@ gtk_xtext_realize (GtkWidget * widget) GdkColor col; GdkColormap *cmap; - GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); + gtk_widget_set_realized (widget, TRUE); xtext = GTK_XTEXT (widget); attributes.x = widget->allocation.x; @@ -733,7 +740,7 @@ gtk_xtext_size_allocate (GtkWidget * widget, GtkAllocation * allocation) height_only = TRUE; widget->allocation = *allocation; - if (GTK_WIDGET_REALIZED (widget)) + if (gtk_widget_get_realized (GTK_WIDGET(widget))) { xtext->buffer->window_width = allocation->width; xtext->buffer->window_height = allocation->height; @@ -2148,15 +2155,15 @@ gtk_xtext_scroll (GtkWidget *widget, GdkEventScroll *event) static void gtk_xtext_class_init (GtkXTextClass * class) { - GtkObjectClass *object_class; + GObjectClass *object_class; GtkWidgetClass *widget_class; GtkXTextClass *xtext_class; - object_class = (GtkObjectClass *) class; + object_class = (GObjectClass *) class; widget_class = (GtkWidgetClass *) class; xtext_class = (GtkXTextClass *) class; - parent_class = gtk_type_class (gtk_widget_get_type ()); + parent_class = g_type_class_peek (g_object_get_type ()); xtext_signals[WORD_CLICK] = g_signal_new ("word_click", @@ -2167,7 +2174,7 @@ gtk_xtext_class_init (GtkXTextClass * class) gtk_marshal_VOID__POINTER_POINTER, G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER); - object_class->destroy = gtk_xtext_destroy; + object_class->dispose = gtk_xtext_destroy; widget_class->realize = gtk_xtext_realize; widget_class->unrealize = gtk_xtext_unrealize; @@ -3226,7 +3233,7 @@ gtk_xtext_set_palette (GtkXText * xtext, GdkColor palette[]) xtext->palette[i] = palette[i]; } - if (GTK_WIDGET_REALIZED (xtext)) + if (gtk_widget_get_realized (GTK_WIDGET(xtext))) { xtext_set_fg (xtext, xtext->fgc, XTEXT_FG); xtext_set_bg (xtext, xtext->fgc, XTEXT_BG); @@ -3321,7 +3328,7 @@ gtk_xtext_set_font (GtkXText *xtext, char *name) gtk_xtext_fix_indent (xtext->buffer); - if (GTK_WIDGET_REALIZED (xtext)) + if (gtk_widget_get_realized (GTK_WIDGET(xtext))) gtk_xtext_recalc_widths (xtext->buffer, TRUE); return TRUE; @@ -3344,14 +3351,14 @@ gtk_xtext_set_background (GtkXText * xtext, GdkPixmap * pixmap) if (pixmap != 0) { g_object_ref (pixmap); - if (GTK_WIDGET_REALIZED (xtext)) + if (gtk_widget_get_realized (GTK_WIDGET(xtext))) { gdk_gc_set_tile (xtext->bgc, pixmap); gdk_gc_set_ts_origin (xtext->bgc, 0, 0); xtext->ts_x = xtext->ts_y = 0; gdk_gc_set_fill (xtext->bgc, GDK_TILED); } - } else if (GTK_WIDGET_REALIZED (xtext)) + } else if (gtk_widget_get_realized (GTK_WIDGET(xtext))) { g_object_unref (xtext->bgc); val.subwindow_mode = GDK_INCLUDE_INFERIORS; @@ -3603,7 +3610,7 @@ gtk_xtext_render_page (GtkXText * xtext) int startline = xtext->adj->value; int pos, overlap; - if(!GTK_WIDGET_REALIZED(xtext)) + if(!gtk_widget_get_realized(GTK_WIDGET(xtext))) return; if (xtext->buffer->indent < MARGIN) @@ -3699,7 +3706,7 @@ gtk_xtext_render_page (GtkXText * xtext) void gtk_xtext_refresh (GtkXText * xtext) { - if (GTK_WIDGET_REALIZED (GTK_WIDGET (xtext))) + if (gtk_widget_get_realized (GTK_WIDGET (xtext))) { gtk_xtext_render_page (xtext); } @@ -4683,7 +4690,7 @@ gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf, int render) xtext->io_tag = 0; } - if (!GTK_WIDGET_REALIZED (GTK_WIDGET (xtext))) + if (!gtk_widget_get_realized (GTK_WIDGET (xtext))) gtk_widget_realize (GTK_WIDGET (xtext)); h = gdk_window_get_height (gtk_widget_get_window (GTK_WIDGET (xtext))); |