diff options
Diffstat (limited to 'battstat/battstat_applet.c')
-rw-r--r-- | battstat/battstat_applet.c | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/battstat/battstat_applet.c b/battstat/battstat_applet.c index 9de1ff7c..1c9d10c9 100644 --- a/battstat/battstat_applet.c +++ b/battstat/battstat_applet.c @@ -44,6 +44,8 @@ #include <libnotify/notify.h> #endif +#include <libmate-desktop/mate-aboutdialog.h> + #include "battstat.h" #include "pixmaps.h" @@ -382,15 +384,9 @@ battstat_error_dialog( GtkWidget *applet, const char *msg ) gtk_window_set_screen( GTK_WINDOW (dialog), gtk_widget_get_screen (GTK_WIDGET (applet)) ); -#if GTK_CHECK_VERSION (3, 0, 0) g_signal_connect_swapped( G_OBJECT (dialog), "response", G_CALLBACK (gtk_widget_destroy), G_OBJECT (dialog) ); -#else - g_signal_connect_swapped( GTK_OBJECT (dialog), "response", - G_CALLBACK (gtk_widget_destroy), - GTK_OBJECT (dialog) ); -#endif gtk_widget_show_all( dialog ); } @@ -513,15 +509,9 @@ battery_full_dialog (GtkWidget *applet) GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); -#if GTK_CHECK_VERSION (3, 0, 0) g_signal_connect_swapped (G_OBJECT (dialog), "response", G_CALLBACK (gtk_widget_destroy), G_OBJECT (dialog)); -#else - g_signal_connect_swapped (GTK_OBJECT (dialog), "response", - G_CALLBACK (gtk_widget_destroy), - GTK_OBJECT (dialog)); -#endif gtk_container_set_border_width (GTK_CONTAINER (dialog), 6); hbox = gtk_hbox_new (FALSE, 6); @@ -677,11 +667,7 @@ battery_low_dialog( ProgressData *battery, BatteryStatus *info ) gtk_dialog_set_default_response( GTK_DIALOG (battery->battery_low_dialog), GTK_RESPONSE_ACCEPT ); -#if GTK_CHECK_VERSION (3, 0, 0) g_signal_connect_swapped( G_OBJECT (battery->battery_low_dialog), -#else - g_signal_connect_swapped( GTK_OBJECT (battery->battery_low_dialog), -#endif "response", G_CALLBACK (battery_low_dialog_destroy), battery ); @@ -1018,12 +1004,8 @@ copy_gdk_pixmap( GdkPixmap *src, GdkGC *gc ) gint height, width; GdkPixmap *dest; - #if GTK_CHECK_VERSION(3, 0, 0) width = gdk_window_get_width(GDK_WINDOW(src)); height = gdk_window_get_height(GDK_WINDOW(src)); - #else - gdk_drawable_get_size(GDK_DRAWABLE(src), &width, &height); - #endif dest = gdk_pixmap_new( GDK_DRAWABLE( src ), width, height, -1 ); @@ -1420,7 +1402,7 @@ about_cb( GtkAction *action, ProgressData *battstat ) /* true */ _("HAL backend enabled.") : /* false */ _("Legacy (non-HAL) backend enabled."))); - gtk_show_about_dialog( NULL, + mate_show_about_dialog( NULL, "version", VERSION, "copyright", "\xC2\xA9 2000 The Gnulix Society, " "\xC2\xA9 2002-2005 Free Software Foundation and " @@ -1747,15 +1729,9 @@ create_layout(ProgressData *battstat) g_object_ref( battstat->status ); g_object_ref( battstat->percent ); g_object_ref( battstat->battery ); -#if GTK_CHECK_VERSION (3, 0, 0) g_object_ref_sink( G_OBJECT( battstat->status ) ); g_object_ref_sink( G_OBJECT( battstat->percent ) ); g_object_ref_sink( G_OBJECT( battstat->battery ) ); -#else - g_object_ref_sink( GTK_OBJECT( battstat->status ) ); - g_object_ref_sink( GTK_OBJECT( battstat->percent ) ); - g_object_ref_sink( GTK_OBJECT( battstat->battery ) ); -#endif /* Let reconfigure_layout know that the table is currently empty. */ battstat->layout.status = LAYOUT_NONE; |