ekiga r6743 - in trunk: lib/gui src/gui
- From: jschamp svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6743 - in trunk: lib/gui src/gui
- Date: Sun, 31 Aug 2008 08:46:11 +0000 (UTC)
Author: jschamp
Date: Sun Aug 31 08:46:11 2008
New Revision: 6743
URL: http://svn.gnome.org/viewvc/ekiga?rev=6743&view=rev
Log:
Migrated away from GtkTooltips (heading for GTK 2.12)
Modified:
trunk/lib/gui/codecsbox.cpp
trunk/lib/gui/gmpreferences.c
trunk/src/gui/main.cpp
Modified: trunk/lib/gui/codecsbox.cpp
==============================================================================
--- trunk/lib/gui/codecsbox.cpp (original)
+++ trunk/lib/gui/codecsbox.cpp Sun Aug 31 08:46:11 2008
@@ -59,7 +59,6 @@
{
Ekiga::Call::StreamType type;
GtkWidget *codecs_list;
- GtkTooltips *tooltips;
};
enum { TYPE = 1 };
@@ -391,7 +390,6 @@
self->priv = new CodecsBoxPrivate;
self->priv->type = Ekiga::Call::Audio;
- self->priv->tooltips = gtk_tooltips_new ();
gtk_box_set_spacing (GTK_BOX (self), 6);
gtk_box_set_homogeneous (GTK_BOX (self), FALSE);
@@ -475,8 +473,7 @@
image = gtk_image_new_from_stock (GTK_STOCK_GO_UP, GTK_ICON_SIZE_MENU);
button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (button), image);
- gtk_tooltips_set_tip (self->priv->tooltips, button,
- _("Move selected codec priority upwards"), NULL);
+ gtk_widget_set_tooltip_text (button, _("Move selected codec priority upwards"));
gtk_box_pack_start (GTK_BOX (buttons_vbox), button, FALSE, FALSE, 0);
g_object_set_data (G_OBJECT (button), "operation", (gpointer) "up");
g_signal_connect (G_OBJECT (button), "clicked",
@@ -486,8 +483,7 @@
image = gtk_image_new_from_stock (GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_MENU);
button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (button), image);
- gtk_tooltips_set_tip (self->priv->tooltips, button,
- _("Move selected codec priority downwards"), NULL);
+ gtk_widget_set_tooltip_text (button, _("Move selected codec priority downwards"));
gtk_box_pack_start (GTK_BOX (buttons_vbox), button, FALSE, FALSE, 0);
g_object_set_data (G_OBJECT (button), "operation", (gpointer) "down");
g_signal_connect (G_OBJECT (button), "clicked",
Modified: trunk/lib/gui/gmpreferences.c
==============================================================================
--- trunk/lib/gui/gmpreferences.c (original)
+++ trunk/lib/gui/gmpreferences.c Sun Aug 31 08:46:11 2008
@@ -57,7 +57,6 @@
GtkWidget *section_label;
GtkWidget *sections_tree_view;
GtkTreeIter iter;
- GtkTooltips *tips;
int last_page;
} GnomePrefsWindow;
@@ -188,7 +187,7 @@
gpw = (GnomePrefsWindow *) g_object_get_data (G_OBJECT (table), "gpw");
if (gpw && tooltip)
- gtk_tooltips_set_tip (gpw->tips, entry, tooltip, NULL);
+ gtk_widget_set_tooltip_text (entry, tooltip);
gtk_widget_show_all (table);
@@ -230,7 +229,7 @@
gpw = (GnomePrefsWindow *) g_object_get_data (G_OBJECT (table), "gpw");
if (gpw && tooltip)
- gtk_tooltips_set_tip (gpw->tips, toggle, tooltip, NULL);
+ gtk_widget_set_tooltip_text (toggle, tooltip);
g_signal_connect (G_OBJECT (toggle), "toggled",
G_CALLBACK (toggle_changed), (gpointer) conf_key);
@@ -307,7 +306,7 @@
gpw = (GnomePrefsWindow *) g_object_get_data (G_OBJECT (table), "gpw");
if (gpw && tooltip)
- gtk_tooltips_set_tip (gpw->tips, hscale, tooltip, NULL);
+ gtk_widget_set_tooltip_text (hscale, tooltip);
g_signal_connect (G_OBJECT (adj), "value-changed",
G_CALLBACK (adjustment_changed),
@@ -403,7 +402,7 @@
gpw = (GnomePrefsWindow *) g_object_get_data (G_OBJECT (table), "gpw");
if (gpw && tooltip)
- gtk_tooltips_set_tip (gpw->tips, spin_button, tooltip, NULL);
+ gtk_widget_set_tooltip_text (spin_button, tooltip);
g_signal_connect (G_OBJECT (adj), "value-changed",
G_CALLBACK (adjustment_changed),
@@ -495,8 +494,8 @@
gpw = (GnomePrefsWindow *) g_object_get_data (G_OBJECT (table), "gpw");
if (gpw && spin1_tooltip && spin2_tooltip) {
- gtk_tooltips_set_tip (gpw->tips, spin_button1, spin1_tooltip, NULL);
- gtk_tooltips_set_tip (gpw->tips, spin_button2, spin2_tooltip, NULL);
+ gtk_widget_set_tooltip_text (spin_button1, spin1_tooltip);
+ gtk_widget_set_tooltip_text (spin_button2, spin2_tooltip);
}
@@ -590,7 +589,7 @@
gpw = (GnomePrefsWindow *) g_object_get_data (G_OBJECT (table), "gpw");
if (gpw && tooltip)
- gtk_tooltips_set_tip (gpw->tips, option_menu, tooltip, NULL);
+ gtk_widget_set_tooltip_text (option_menu, tooltip);
g_signal_connect (GTK_COMBO_BOX (option_menu),
"changed", G_CALLBACK (int_option_menu_changed),
@@ -686,7 +685,7 @@
gpw = (GnomePrefsWindow *) g_object_get_data (G_OBJECT (table), "gpw");
if (gpw && tooltip)
- gtk_tooltips_set_tip (gpw->tips, option_menu, tooltip, NULL);
+ gtk_widget_set_tooltip_text (option_menu, tooltip);
g_signal_connect (GTK_COMBO_BOX (option_menu),
"changed", G_CALLBACK (string_option_menu_changed),
@@ -933,10 +932,6 @@
gtk_container_add (GTK_CONTAINER (dialog_vbox), hbox);
- /* The tooltips */
- gpw->tips = gtk_tooltips_new ();
-
-
/* Build the TreeView on the left */
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
Modified: trunk/src/gui/main.cpp
==============================================================================
--- trunk/src/gui/main.cpp (original)
+++ trunk/src/gui/main.cpp Sun Aug 31 08:46:11 2008
@@ -130,7 +130,6 @@
GtkListStore *completion;
- GtkTooltips *tips;
GtkAccelGroup *accel;
GtkWidget *main_menu;
@@ -1444,7 +1443,6 @@
gtk_widget_destroy (mw->audio_settings_window);
gtk_widget_destroy (mw->video_settings_window);
- g_object_unref (mw->tips);
delete ((GmMainWindow *) mw);
}
@@ -1636,8 +1634,8 @@
gtk_container_set_border_width (GTK_CONTAINER (mw->connect_button), 0);
gtk_tool_item_set_expand (GTK_TOOL_ITEM (item), FALSE);
- gtk_tooltips_set_tip (mw->tips, GTK_WIDGET (mw->connect_button),
- _("Enter a URI on the left, and click this button to place a call"), NULL);
+ gtk_widget_set_tooltip_text (GTK_WIDGET (mw->connect_button),
+ _("Enter a URI on the left, and click this button to place a call"));
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
@@ -2003,8 +2001,7 @@
gtk_box_pack_start (GTK_BOX (hbox), hscale_brightness, TRUE, TRUE, 2);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 3);
- gtk_tooltips_set_tip (mw->tips, hscale_brightness,
- _("Adjust brightness"), NULL);
+ gtk_widget_set_tooltip_text (hscale_brightness, _("Adjust brightness"));
g_signal_connect (G_OBJECT (mw->adj_brightness), "value-changed",
G_CALLBACK (video_settings_changed_cb),
@@ -2025,8 +2022,7 @@
gtk_box_pack_start (GTK_BOX (hbox), hscale_whiteness, TRUE, TRUE, 2);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 3);
- gtk_tooltips_set_tip (mw->tips, hscale_whiteness,
- _("Adjust whiteness"), NULL);
+ gtk_widget_set_tooltip_text (hscale_whiteness, _("Adjust whiteness"));
g_signal_connect (G_OBJECT (mw->adj_whiteness), "value-changed",
G_CALLBACK (video_settings_changed_cb),
@@ -2047,8 +2043,7 @@
gtk_box_pack_start (GTK_BOX (hbox), hscale_colour, TRUE, TRUE, 2);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 3);
- gtk_tooltips_set_tip (mw->tips, hscale_colour,
- _("Adjust color"), NULL);
+ gtk_widget_set_tooltip_text (hscale_colour, _("Adjust color"));
g_signal_connect (G_OBJECT (mw->adj_colour), "value-changed",
G_CALLBACK (video_settings_changed_cb),
@@ -2069,8 +2064,7 @@
gtk_box_pack_start (GTK_BOX (hbox), hscale_contrast, TRUE, TRUE, 2);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 3);
- gtk_tooltips_set_tip (mw->tips, hscale_contrast,
- _("Adjust contrast"), NULL);
+ gtk_widget_set_tooltip_text (hscale_contrast, _("Adjust contrast"));
g_signal_connect (G_OBJECT (mw->adj_contrast), "value-changed",
G_CALLBACK (video_settings_changed_cb),
@@ -2349,9 +2343,8 @@
gtk_widget_show (button);
gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
GTK_TOOL_ITEM (item), -1);
- gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (item), mw->tips,
- _("Change the volume of your soundcard"),
- NULL);
+ gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (item),
+ _("Change the volume of your soundcard"));
gtk_widget_set_size_request (GTK_WIDGET (button), 28, 28);
@@ -2372,9 +2365,8 @@
gtk_widget_show (button);
gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
GTK_TOOL_ITEM (item), -1);
- gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (item), mw->tips,
- _("Change the color settings of your video device"),
- NULL);
+ gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (item),
+ _("Change the color settings of your video device"));
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (show_window_cb),
@@ -2395,9 +2387,8 @@
gtk_widget_show (mw->preview_button);
gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
GTK_TOOL_ITEM (item), -1);
- gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (item), mw->tips,
- _("Display images from your camera device"),
- NULL);
+ gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (item),
+ _("Display images from your camera device"));
g_signal_connect (G_OBJECT (mw->preview_button), "toggled",
G_CALLBACK (toolbar_toggle_button_changed_cb),
@@ -2416,8 +2407,8 @@
gtk_widget_show (mw->hold_button);
gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
GTK_TOOL_ITEM (item), -1);
- gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (item), mw->tips,
- _("Hold the current call"), NULL);
+ gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (item),
+ _("Hold the current call"));
gtk_widget_set_sensitive (GTK_WIDGET (mw->hold_button), FALSE);
g_signal_connect (G_OBJECT (mw->hold_button), "clicked",
@@ -2961,7 +2952,7 @@
}
}
- gtk_tooltips_set_tip (mw->tips, GTK_WIDGET (e), tip_text, NULL);
+ gtk_widget_set_tooltip_text (GTK_WIDGET (e), tip_text);
}
@@ -3871,9 +3862,7 @@
mw->video_widget_gc = NULL;
#endif
- /* Tooltips and accelerators */
- mw->tips = gtk_tooltips_new ();
- g_object_ref_sink (mw->tips);
+ /* Accelerators */
mw->accel = gtk_accel_group_new ();
gtk_window_add_accel_group (GTK_WINDOW (window), mw->accel);
g_object_unref (mw->accel);
@@ -4319,8 +4308,7 @@
if (mw->statusbar_ebox) {
- gtk_tooltips_set_tip (mw->tips, GTK_WIDGET (mw->statusbar_ebox),
- stats_msg, NULL);
+ gtk_widget_set_tooltip_text (GTK_WIDGET (mw->statusbar_ebox), stats_msg);
}
g_free (stats_msg);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]