[gnome-applets/gtk3: 20/23] gweather: Fix the build with gtk3
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/gtk3: 20/23] gweather: Fix the build with gtk3
- Date: Thu, 28 Oct 2010 13:10:08 +0000 (UTC)
commit 164372a2be4f39084589e46d923c9e3eee4120c0
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 | 19 +++++++--------
gweather/gweather-dialog.c | 1 -
gweather/gweather-pref.c | 51 +++++++++++++++++++++----------------------
4 files changed, 37 insertions(+), 38 deletions(-)
---
diff --git a/gweather/Makefile.am b/gweather/Makefile.am
index ea6ac96..d2cd7ee 100644
--- a/gweather/Makefile.am
+++ b/gweather/Makefile.am
@@ -7,6 +7,7 @@ INCLUDES = \
-I$(top_srcdir) \
-DGWEATHER_MENU_UI_DIR=\""$(uidir)"\" \
$(GNOME_APPLETS3_CFLAGS) \
+ $(DBUS_CFLAGS) \
$(LIBNOTIFY_CFLAGS) \
$(LIBGWEATHER_CFLAGS) \
$(NETWORKMANAGER_CFLAGS)
@@ -24,11 +25,12 @@ gweather_applet_2_SOURCES = \
gweather_applet_2_LDADD = \
$(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 39f521b..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:
@@ -470,8 +470,7 @@ update_finish (WeatherInfo *info, gpointer data)
if (icon == NULL)
icon = "stock-unknown";
- n = notify_notification_new (message, detail, icon,
- gw_applet->container);
+ n = notify_notification_new (message, detail, icon);
notify_notification_show (n, &error);
if (error)
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]