[gnome-applets] gweather: Fix the build with gtk3
- From: Kjartan Maraas <kmaraas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] gweather: Fix the build with gtk3
- Date: Sat, 8 Jan 2011 20:14:38 +0000 (UTC)
commit e963da0a21cf50622a1cc548f01e148df1ff575b
Author: Christian Persch <chpe gnome org>
Date: Thu Oct 28 14:54:10 2010 +0200
gweather: Fix the build with gtk3
gweather/Makefile.am | 4 ++-
gweather/gweather-applet.c | 16 +++++++-------
gweather/gweather-dialog.c | 1 -
gweather/gweather-pref.c | 51 +++++++++++++++++++++----------------------
4 files changed, 36 insertions(+), 36 deletions(-)
---
diff --git a/gweather/Makefile.am b/gweather/Makefile.am
index 165efda..27f784a 100644
--- a/gweather/Makefile.am
+++ b/gweather/Makefile.am
@@ -8,6 +8,7 @@ INCLUDES = \
-DGWEATHER_MENU_UI_DIR=\""$(uidir)"\" \
$(DBUS_CFLAGS) \
$(GNOME_APPLETS3_CFLAGS) \
+ $(DBUS_CFLAGS) \
$(LIBNOTIFY_CFLAGS) \
$(LIBGWEATHER_CFLAGS) \
$(NETWORKMANAGER_CFLAGS)
@@ -26,11 +27,12 @@ gweather_applet_2_LDADD = \
$(DBUS_LIBS) \
$(LIBNOTIFY_LIBS) \
$(GNOME_APPLETS3_LIBS) \
+ $(DBUS_LIBS) \
$(GNOME_LIBS2_LIBS) \
$(LIBGWEATHER_LIBS) \
$(NETWORKMANAGER_LIBS)
-uidir = $(datadir)/gnome-2.0/ui
+uidir = $(pkgdatadir)/ui
ui_DATA = gweather-applet-menu.xml
appletdir = $(datadir)/gnome-panel/applets
diff --git a/gweather/gweather-applet.c b/gweather/gweather-applet.c
index 18598f3..e18e3f3 100644
--- a/gweather/gweather-applet.c
+++ b/gweather/gweather-applet.c
@@ -247,24 +247,24 @@ static gboolean
key_press_cb (GtkWidget *widget, GdkEventKey *event, GWeatherApplet *gw_applet)
{
switch (event->keyval) {
- case GDK_u:
+ case GDK_KEY_u:
if (event->state == GDK_CONTROL_MASK) {
gweather_update (gw_applet);
return TRUE;
}
break;
- case GDK_d:
+ case GDK_KEY_d:
if (event->state == GDK_CONTROL_MASK) {
details_cb (NULL, gw_applet);
return TRUE;
}
break;
- case GDK_KP_Enter:
- case GDK_ISO_Enter:
- case GDK_3270_Enter:
- case GDK_Return:
- case GDK_space:
- case GDK_KP_Space:
+ case GDK_KEY_KP_Enter:
+ case GDK_KEY_ISO_Enter:
+ case GDK_KEY_3270_Enter:
+ case GDK_KEY_Return:
+ case GDK_KEY_space:
+ case GDK_KEY_KP_Space:
details_cb (NULL, gw_applet);
return TRUE;
default:
diff --git a/gweather/gweather-dialog.c b/gweather/gweather-dialog.c
index e276db0..94ab4bf 100644
--- a/gweather/gweather-dialog.c
+++ b/gweather/gweather-dialog.c
@@ -216,7 +216,6 @@ gweather_dialog_create (GWeatherDialog *dialog)
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
- gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 2);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
diff --git a/gweather/gweather-pref.c b/gweather/gweather-pref.c
index a76278c..95fe789 100644
--- a/gweather/gweather-pref.c
+++ b/gweather/gweather-pref.c
@@ -808,7 +808,6 @@ gweather_pref_create (GWeatherPref *pref)
GTK_STOCK_HELP, GTK_RESPONSE_HELP,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (pref), GTK_RESPONSE_CLOSE);
- gtk_dialog_set_has_separator (GTK_DIALOG (pref), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (pref), 5);
gtk_window_set_resizable (GTK_WINDOW (pref), TRUE);
gtk_window_set_screen (GTK_WINDOW (pref),
@@ -853,14 +852,14 @@ gweather_pref_create (GWeatherPref *pref)
gtk_misc_set_alignment (GTK_MISC (temp_label), 0, 0.5);
gtk_widget_show (temp_label);
- temp_combo = gtk_combo_box_new_text ();
+ temp_combo = gtk_combo_box_text_new ();
pref->priv->basic_temp_combo = temp_combo;
gtk_label_set_mnemonic_widget (GTK_LABEL (temp_label), temp_combo);
- gtk_combo_box_append_text (GTK_COMBO_BOX (temp_combo), _("Default"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (temp_combo), _("Kelvin"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (temp_combo), _("Default"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (temp_combo), _("Kelvin"));
/* TRANSLATORS: Celsius is sometimes referred Centigrade */
- gtk_combo_box_append_text (GTK_COMBO_BOX (temp_combo), _("Celsius"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (temp_combo), _("Fahrenheit"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (temp_combo), _("Celsius"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (temp_combo), _("Fahrenheit"));
gtk_widget_show (temp_combo);
if ( ! key_writable (pref, GCONF_TEMP_UNIT))
@@ -873,19 +872,19 @@ gweather_pref_create (GWeatherPref *pref)
gtk_misc_set_alignment (GTK_MISC (speed_label), 0, 0.5);
gtk_widget_show (speed_label);
- speed_combo = gtk_combo_box_new_text ();
+ speed_combo = gtk_combo_box_text_new ();
pref->priv->basic_speed_combo = speed_combo;
gtk_label_set_mnemonic_widget (GTK_LABEL (speed_label), speed_combo);
- gtk_combo_box_append_text (GTK_COMBO_BOX (speed_combo), _("Default"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (speed_combo), _("Default"));
/* TRANSLATOR: The wind speed unit "meters per second" */
- gtk_combo_box_append_text (GTK_COMBO_BOX (speed_combo), _("m/s"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (speed_combo), _("m/s"));
/* TRANSLATOR: The wind speed unit "kilometers per hour" */
- gtk_combo_box_append_text (GTK_COMBO_BOX (speed_combo), _("km/h"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (speed_combo), _("km/h"));
/* TRANSLATOR: The wind speed unit "miles per hour" */
- gtk_combo_box_append_text (GTK_COMBO_BOX (speed_combo), _("mph"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (speed_combo), _("mph"));
/* TRANSLATOR: The wind speed unit "knots" */
- gtk_combo_box_append_text (GTK_COMBO_BOX (speed_combo), _("knots"));
- gtk_combo_box_append_text (GTK_COMBO_BOX (speed_combo),
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (speed_combo), _("knots"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (speed_combo),
_("Beaufort scale"));
gtk_widget_show (speed_combo);
@@ -899,22 +898,22 @@ gweather_pref_create (GWeatherPref *pref)
gtk_misc_set_alignment (GTK_MISC (pres_label), 0, 0.5);
gtk_widget_show (pres_label);
- pres_combo = gtk_combo_box_new_text ();
+ pres_combo = gtk_combo_box_text_new ();
pref->priv->basic_pres_combo = pres_combo;
gtk_label_set_mnemonic_widget (GTK_LABEL (pres_label), pres_combo);
- gtk_combo_box_append_text (GTK_COMBO_BOX (pres_combo), _("Default"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (pres_combo), _("Default"));
/* TRANSLATOR: The pressure unit "kiloPascals" */
- gtk_combo_box_append_text (GTK_COMBO_BOX (pres_combo), _("kPa"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (pres_combo), _("kPa"));
/* TRANSLATOR: The pressure unit "hectoPascals" */
- gtk_combo_box_append_text (GTK_COMBO_BOX (pres_combo), _("hPa"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (pres_combo), _("hPa"));
/* TRANSLATOR: The pressure unit "millibars" */
- gtk_combo_box_append_text (GTK_COMBO_BOX (pres_combo), _("mb"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (pres_combo), _("mb"));
/* TRANSLATOR: The pressure unit "millibars of mercury" */
- gtk_combo_box_append_text (GTK_COMBO_BOX (pres_combo), _("mmHg"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (pres_combo), _("mmHg"));
/* TRANSLATOR: The pressure unit "inches of mercury" */
- gtk_combo_box_append_text (GTK_COMBO_BOX (pres_combo), _("inHg"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (pres_combo), _("inHg"));
/* TRANSLATOR: The pressure unit "atmospheres" */
- gtk_combo_box_append_text (GTK_COMBO_BOX (pres_combo), _("atm"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (pres_combo), _("atm"));
gtk_widget_show (pres_combo);
if ( ! key_writable (pref, GCONF_PRESSURE_UNIT))
@@ -927,16 +926,16 @@ gweather_pref_create (GWeatherPref *pref)
gtk_misc_set_alignment (GTK_MISC (dist_label), 0, 0.5);
gtk_widget_show (dist_label);
- dist_combo = gtk_combo_box_new_text ();
+ dist_combo = gtk_combo_box_text_new ();
pref->priv->basic_dist_combo = dist_combo;
gtk_label_set_mnemonic_widget (GTK_LABEL (dist_label), dist_combo);
- gtk_combo_box_append_text (GTK_COMBO_BOX (dist_combo), _("Default"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dist_combo), _("Default"));
/* TRANSLATOR: The distance unit "meters" */
- gtk_combo_box_append_text (GTK_COMBO_BOX (dist_combo), _("meters"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dist_combo), _("meters"));
/* TRANSLATOR: The distance unit "kilometers" */
- gtk_combo_box_append_text (GTK_COMBO_BOX (dist_combo), _("km"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dist_combo), _("km"));
/* TRANSLATOR: The distance unit "miles" */
- gtk_combo_box_append_text (GTK_COMBO_BOX (dist_combo), _("miles"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dist_combo), _("miles"));
gtk_widget_show (dist_combo);
if ( ! key_writable (pref, GCONF_DISTANCE_UNIT))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]