gnome-netstatus r748 - in trunk: . src
- From: diegoe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-netstatus r748 - in trunk: . src
- Date: Thu, 27 Nov 2008 01:39:04 +0000 (UTC)
Author: diegoe
Date: Thu Nov 27 01:39:04 2008
New Revision: 748
URL: http://svn.gnome.org/viewvc/gnome-netstatus?rev=748&view=rev
Log:
Remove deprecated GTK+ symbols in gnome-netstatus.
Fixes bug #562392. Patch by Maxim Ermilov.
Modified:
trunk/ChangeLog
trunk/src/gnome-netstatus.glade
trunk/src/netstatus-dialog.c
trunk/src/netstatus-icon.c
Modified: trunk/src/gnome-netstatus.glade
==============================================================================
--- trunk/src/gnome-netstatus.glade (original)
+++ trunk/src/gnome-netstatus.glade Thu Nov 27 01:39:04 2008
@@ -290,7 +290,6 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">combo-entry1</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
@@ -307,42 +306,20 @@
</child>
<child>
- <widget class="GtkCombo" id="name_combo">
+ <widget class="GtkComboBoxEntry" id="name_combo_box_entry">
<property name="visible">True</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">False</property>
- <property name="case_sensitive">True</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="combo-entry1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="combo-list1">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
- </widget>
- </child>
+ <property name="add_tearoffs">False</property>
+ <property name="has_frame">True</property>
+ <property name="focus_on_click">True</property>
+ <property name="items"> </property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">0</property>
<property name="bottom_attach">1</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
</packing>
</child>
</widget>
Modified: trunk/src/netstatus-dialog.c
==============================================================================
--- trunk/src/netstatus-dialog.c (original)
+++ trunk/src/netstatus-dialog.c Thu Nov 27 01:39:04 2008
@@ -118,7 +118,7 @@
}
UNKNOWN_STR (text, iface_name);
- gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (data->name)->entry), text);
+ gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (data->name))), text);
}
static inline void
@@ -619,7 +619,7 @@
data->icon = NETSTATUS_ICON (icon);
- data->name = glade_xml_get_widget (xml, "name_combo");
+ data->name = glade_xml_get_widget (xml, "name_combo_box_entry");
data->status = glade_xml_get_widget (xml, "status_label");
netstatus_dialog_update_name (data);
@@ -679,7 +679,7 @@
netstatus_dialog_iface_list_monitor (NetstatusDialogData *data)
{
GList *iface_names, *l;
- int n_ifaces;
+ int n_ifaces, i;
iface_names = netstatus_list_interface_names (NULL);
@@ -687,13 +687,18 @@
if (data->n_ifaces != n_ifaces)
{
- g_signal_handlers_block_by_func (GTK_COMBO (data->name)->entry,
+ g_signal_handlers_block_by_func (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (data->name))),
G_CALLBACK (netstatus_dialog_set_iface_name), data);
-
- gtk_combo_set_popdown_strings (GTK_COMBO (data->name), iface_names);
+ i = gtk_tree_model_iter_n_children (gtk_combo_box_get_model (GTK_COMBO_BOX (data->name)), NULL);
+ while (i > 0)
+ gtk_combo_box_remove_text (GTK_COMBO_BOX (data->name), --i);
+
+ for (l = iface_names; l; l = l->next)
+ gtk_combo_box_append_text (GTK_COMBO_BOX (data->name), l->data);
+
netstatus_dialog_update_name (data);
- g_signal_handlers_unblock_by_func (GTK_COMBO (data->name)->entry,
+ g_signal_handlers_unblock_by_func (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (data->name))),
G_CALLBACK (netstatus_dialog_set_iface_name), data);
}
@@ -772,7 +777,7 @@
data);
netstatus_dialog_iface_list_monitor (data);
- g_signal_connect_swapped (GTK_COMBO (data->name)->entry, "changed",
+ g_signal_connect_swapped (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (data->name))), "changed",
G_CALLBACK (netstatus_dialog_set_iface_name),
data);
g_object_unref (xml);
Modified: trunk/src/netstatus-icon.c
==============================================================================
--- trunk/src/netstatus-icon.c (original)
+++ trunk/src/netstatus-icon.c Thu Nov 27 01:39:04 2008
@@ -61,8 +61,6 @@
GtkOrientation orientation;
int size;
- GtkTooltips *tooltips;
-
gulong state_changed_id;
gulong name_changed_id;
gulong wireless_changed_id;
@@ -389,7 +387,7 @@
tip = _("Network Connection");
}
- gtk_tooltips_set_tip (icon->priv->tooltips, GTK_WIDGET (icon), tip, NULL);
+ gtk_widget_set_tooltip_text (GTK_WIDGET (icon), tip);
g_free (freeme);
}
@@ -479,10 +477,6 @@
icon->priv->wireless_changed_id = 0;
icon->priv->signal_changed_id = 0;
- if (icon->priv->tooltips)
- g_object_unref (icon->priv->tooltips);
- icon->priv->tooltips = NULL;
-
icon->priv->image = NULL;
GTK_OBJECT_CLASS (parent_class)->destroy (widget);
@@ -588,7 +582,7 @@
static inline GObjectClass *
get_box_class (GtkOrientation orientation)
{
- return gtk_type_class (orientation == GTK_ORIENTATION_HORIZONTAL ? GTK_TYPE_HBOX : GTK_TYPE_VBOX);
+ return g_type_class_ref (orientation == GTK_ORIENTATION_HORIZONTAL ? GTK_TYPE_HBOX : GTK_TYPE_VBOX);
}
static void
@@ -874,10 +868,6 @@
gtk_container_add (GTK_CONTAINER (icon), icon->priv->signal_image);
gtk_widget_hide (icon->priv->signal_image);
- icon->priv->tooltips = gtk_tooltips_new ();
- g_object_ref (icon->priv->tooltips);
- gtk_object_sink (GTK_OBJECT (icon->priv->tooltips));
-
gtk_widget_add_events (GTK_WIDGET (icon),
GDK_BUTTON_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
}
@@ -1066,10 +1056,7 @@
{
icon->priv->tooltips_enabled = enabled;
- if (enabled)
- gtk_tooltips_enable (icon->priv->tooltips);
- else
- gtk_tooltips_disable (icon->priv->tooltips);
+ gtk_widget_set_has_tooltip (GTK_WIDGET (icon), enabled);
g_object_notify (G_OBJECT (icon), "tooltips-enabled");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]