[Xfce4-commits] <xfce4-session:jeromeg/libxfce4ui> Import initial work from perldude's patch.

Jérôme Guelfucci noreply at xfce.org
Wed Jan 20 18:24:02 CET 2010


Updating branch refs/heads/jeromeg/libxfce4ui
         to 4147f173b1b121c250973cf692f851ca5c825393 (commit)
       from bfb32abdc9125fa8e1e3cc30624922e453014d04 (commit)

commit 4147f173b1b121c250973cf692f851ca5c825393
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Wed Jan 20 08:16:32 2010 +0100

    Import initial work from perldude's patch.

 configure.in.in            |    2 +-
 engines/balou/Makefile.am  |    2 +-
 engines/balou/config.c     |   33 +++++++++++++++++----------------
 engines/mice/Makefile.am   |    8 ++++----
 engines/simple/Makefile.am |    6 +++---
 engines/simple/simple.c    |   22 +++++++++++-----------
 libxfsm/Makefile.am        |    4 ++--
 libxfsm/xfsm-util.c        |   22 +++++++++++-----------
 settings/Makefile.am       |    4 ++--
 settings/main.c            |    5 ++---
 settings/module.c          |   10 +++++-----
 settings/session-editor.c  |    4 ++--
 settings/splash-settings.c |   12 ++++++------
 settings/xfae-dialog.c     |    6 +++---
 settings/xfae-dialog.h     |    6 +++---
 settings/xfae-model.c      |   13 ++++++++-----
 settings/xfae-model.h      |    6 +++---
 settings/xfae-window.c     |   20 +++++++++++---------
 xfce4-session/Makefile.am  |    4 ++--
 xfce4-session/main.c       |    2 +-
 xfce4-session/shutdown.c   |    8 +++++---
 21 files changed, 103 insertions(+), 96 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index 905f23a..9b09044 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -70,7 +70,7 @@ XDT_I18N([@LINGUAS@])
 
 dnl Check for required packages
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.6.0])
-XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.6.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.6.0])
 XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0])
 XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.12])
 XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.0.0])
diff --git a/engines/balou/Makefile.am b/engines/balou/Makefile.am
index d9743b8..387d374 100644
--- a/engines/balou/Makefile.am
+++ b/engines/balou/Makefile.am
@@ -18,7 +18,7 @@ libbalou_la_SOURCES =							\
 
 libbalou_la_CFLAGS =							\
 	-I$(top_srcdir)							\
-	$(LIBXFCEGUI4_CFLAGS)						\
+	$(LIBXFCE4UI_CFLAGS)						\
 	$(XFCONF_CFLAGS)						\
 	-DBALOU_EXPORT_THEME=\"$(libexecdir)/balou-export-theme\"	\
 	-DBALOU_INSTALL_THEME=\"$(libexecdir)/balou-install-theme\"
diff --git a/engines/balou/config.c b/engines/balou/config.c
index e618d60..4f0d355 100644
--- a/engines/balou/config.c
+++ b/engines/balou/config.c
@@ -7,12 +7,12 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
- *                                                                              
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *                                                                              
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
@@ -39,7 +39,7 @@
 
 #include <gmodule.h>
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <libxfsm/xfsm-splash-engine.h>
 
@@ -393,7 +393,7 @@ config_remove_theme (GtkWidget *item,
 
   if (!result || status != 0)
     {
-      xfce_err (_("Unable to remove splash theme \"%s\" from directory "
+      xfce_dialog_show_error (NULL, NULL, _("Unable to remove splash theme \"%s\" from directory "
                   "%s."), name, directory);
     }
   else
@@ -417,7 +417,7 @@ config_do_export_theme (const gchar *name,
   gchar   *themerc;
   gchar   *argv[4];
   gint     status;
-  
+
   resource = g_strconcat (name, "/balou/themerc", NULL);
   themerc = xfce_resource_lookup (XFCE_RESOURCE_THEMES, resource);
   g_free (resource);
@@ -478,18 +478,19 @@ config_export_theme (GtkWidget *item,
     return;
 
   toplevel = gtk_widget_get_toplevel (GTK_WIDGET (treeview));
-  dialog = xfce_file_chooser_new (_("Choose theme filename..."),
-                                  GTK_WINDOW (toplevel),
-                                  XFCE_FILE_CHOOSER_ACTION_SAVE,
-                                  GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                  GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-                                  NULL);
+
+  dialog = gtk_file_chooser_dialog_new (_("Choose theme filename..."),
+                                        GTK_WINDOW (toplevel),
+                                        GTK_FILE_CHOOSER_ACTION_SAVE,
+                                        GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                                        GTK_STOCK_SAVE, GTK_RESPONSE_OK,
+                                        NULL);
   file = g_strconcat (name, ".tar.gz", NULL);
-  xfce_file_chooser_set_current_name (XFCE_FILE_CHOOSER (dialog), file);
+  gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), file);
   g_free (file);
   if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
     {
-      file = xfce_file_chooser_get_filename (XFCE_FILE_CHOOSER (dialog));
+      file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
 
       config_do_export_theme (name, file);
 
@@ -852,13 +853,13 @@ config_create (XfsmSplashRc *rc)
   page = gtk_vbox_new (FALSE, BORDER);
   gtk_container_set_border_width (GTK_CONTAINER (page), BORDER);
 
-  frame = xfce_framebox_new (_("Balou theme"), TRUE);
+  frame = xfce_gtk_frame_box_new (_("Balou theme"), NULL);
   gtk_box_pack_start (GTK_BOX (page), frame, TRUE, TRUE, 0);
   vbox = gtk_vbox_new (FALSE, 0);
-  xfce_framebox_add (XFCE_FRAMEBOX (frame), vbox);
+  gtk_container_add (GTK_CONTAINER (frame), vbox);
 
   swin = gtk_scrolled_window_new (NULL, NULL);
-  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), 
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin),
                                   GTK_POLICY_NEVER,
                                   GTK_POLICY_AUTOMATIC);
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (swin),
diff --git a/engines/mice/Makefile.am b/engines/mice/Makefile.am
index 231955b..c3597ec 100644
--- a/engines/mice/Makefile.am
+++ b/engines/mice/Makefile.am
@@ -9,7 +9,7 @@ libmice_la_SOURCES =							\
 
 libmice_la_CFLAGS =							\
 	-I$(top_srcdir)							\
-	$(LIBXFCEGUI4_CFLAGS)						\
+	$(LIBXFCE4UI_CFLAGS)						\
 	$(XFCONF_CFLAGS)
 
 libmice_la_LDFLAGS =							\
@@ -19,7 +19,7 @@ libmice_la_LDFLAGS =							\
 
 libmice_la_LIBADD =							\
 	$(top_builddir)/libxfsm/libxfsm-4.6.la				\
-	$(LIBXFCEGUI4_LIBS)						\
+	$(LIBXFCE4UI_LIBS)						\
 	$(XFCONF_LIBS)
 
 libmice_la_DEPENDENCIES =						\
@@ -32,10 +32,10 @@ generate_SOURCES =							\
 	generate.c
 
 generate_CFLAGS =							\
-	$(LIBXFCEGUI4_CFLAGS)
+	$(LIBXFCE4UI_CFLAGS)
 
 generate_LDADD =							\
-	$(LIBXFCEGUI4_LIBS)
+	$(LIBXFCE4UI_LIBS)
 
 
 EXTRA_DIST =								\
diff --git a/engines/simple/Makefile.am b/engines/simple/Makefile.am
index ab4e398..031b1d5 100644
--- a/engines/simple/Makefile.am
+++ b/engines/simple/Makefile.am
@@ -10,7 +10,7 @@ libsimple_la_SOURCES =							\
 libsimple_la_CFLAGS =							\
 	-I$(top_srcdir)							\
 	$(LIBX11_CFLAGS)						\
-	$(LIBXFCEGUI4_CFLAGS)						\
+	$(LIBXFCE4UI_CFLAGS)						\
 	$(XFCONF_CFLAGS)
 
 libsimple_la_LDFLAGS =							\
@@ -22,12 +22,12 @@ libsimple_la_LDFLAGS =							\
 libsimple_la_LIBADD =							\
 	$(top_builddir)/libxfsm/libxfsm-4.6.la				\
 	$(LIBX11_LIBS)							\
-	$(LIBXFCEGUI4_LIBS)						\
+	$(LIBXFCE4UI_LIBS)						\
 	$(XFCONF_LIBS)
 
 libsimple_la_DEPENDENCIES =						\
 	$(top_builddir)/libxfsm/libxfsm-4.6.la
-	
+
 EXTRA_DIST =								\
 	fallback.h							\
 	fallback.png							\
diff --git a/engines/simple/simple.c b/engines/simple/simple.c
index 435d719..233e03e 100644
--- a/engines/simple/simple.c
+++ b/engines/simple/simple.c
@@ -32,7 +32,7 @@
 #include <gdk-pixbuf/gdk-pixdata.h>
 #include <gmodule.h>
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <libxfsm/xfsm-splash-engine.h>
 
@@ -353,22 +353,22 @@ config_configure (XfsmSplashConfig *config,
 
   dbox = GTK_BOX (GTK_DIALOG (dialog)->vbox);
 
-  frame = xfce_framebox_new (_("Font"), FALSE);
+  frame = xfce_gtk_frame_box_new (_("Font"), NULL);
   gtk_box_pack_start (dbox, frame, FALSE, FALSE, 6);
   gtk_widget_show (frame);
 
   font = xfsm_splash_rc_read_entry (config->rc, "Font", DEFAULT_FONT);
   btn_font = gtk_font_button_new_with_font (font);
   g_free (font);
-  xfce_framebox_add (XFCE_FRAMEBOX (frame), btn_font);
+  gtk_container_add (GTK_CONTAINER (frame), btn_font);
   gtk_widget_show (btn_font);
 
-  frame = xfce_framebox_new (_("Colors"), FALSE);
+  frame = xfce_gtk_frame_box_new (_("Colors"), NULL);
   gtk_box_pack_start (dbox, frame, FALSE, FALSE, 6);
   gtk_widget_show (frame);
 
   table = gtk_table_new (2, 2, FALSE);
-  xfce_framebox_add (XFCE_FRAMEBOX (frame), table);
+  gtk_container_add (GTK_CONTAINER (frame), table);
   gtk_widget_show (table);
 
   label = gtk_label_new (_("Background color:"));
@@ -379,7 +379,7 @@ config_configure (XfsmSplashConfig *config,
   colorstr = xfsm_splash_rc_read_entry (config->rc, "BgColor", DEFAULT_BGCOLOR);
   gdk_color_parse (colorstr, &color);
   g_free (colorstr);
-  sel_bg = xfce_color_button_new_with_color (&color);
+  sel_bg = gtk_color_button_new_with_color (&color);
   gtk_table_attach (GTK_TABLE (table), sel_bg, 1, 2, 0, 1,
                     GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (sel_bg);
@@ -392,17 +392,17 @@ config_configure (XfsmSplashConfig *config,
   colorstr = xfsm_splash_rc_read_entry (config->rc, "FgColor", DEFAULT_FGCOLOR);
   gdk_color_parse (colorstr, &color);
   g_free (colorstr);
-  sel_fg = xfce_color_button_new_with_color (&color);
+  sel_fg = gtk_color_button_new_with_color (&color);
   gtk_table_attach (GTK_TABLE (table), sel_fg, 1, 2, 1, 2,
                     GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (sel_fg);
 
-  frame = xfce_framebox_new (_("Image"), FALSE);
+  frame = xfce_gtk_frame_box_new (_("Image"), NULL);
   gtk_box_pack_start (dbox, frame, FALSE, FALSE, 6);
   gtk_widget_show (frame);
 
   vbox = gtk_vbox_new (FALSE, 6);
-  xfce_framebox_add (XFCE_FRAMEBOX (frame), vbox);
+  gtk_container_add (GTK_CONTAINER (frame), vbox);
   gtk_widget_show (vbox);
 
   checkbox = gtk_check_button_new_with_label (_("Use custom image"));
@@ -452,14 +452,14 @@ config_configure (XfsmSplashConfig *config,
   xfsm_splash_rc_write_entry (config->rc, "Font",
                               gtk_font_button_get_font_name (GTK_FONT_BUTTON (btn_font)));
 
-  xfce_color_button_get_color (XFCE_COLOR_BUTTON (sel_bg), &color);
+  gtk_color_button_get_color (GTK_COLOR_BUTTON (sel_bg), &color);
   g_snprintf (buffer, 32, "#%02x%02x%02x",
               (unsigned) color.red >> 8,
               (unsigned) color.green >> 8,
               (unsigned) color.blue >> 8);
   xfsm_splash_rc_write_entry (config->rc, "BgColor", buffer);
 
-  xfce_color_button_get_color (XFCE_COLOR_BUTTON (sel_fg), &color);
+  gtk_color_button_get_color (GTK_COLOR_BUTTON (sel_fg), &color);
   g_snprintf (buffer, 32, "#%02x%02x%02x",
               (unsigned) color.red >> 8,
               (unsigned) color.green >> 8,
diff --git a/libxfsm/Makefile.am b/libxfsm/Makefile.am
index bf877f4..92082dd 100644
--- a/libxfsm/Makefile.am
+++ b/libxfsm/Makefile.am
@@ -12,7 +12,7 @@ libxfsm_4_6_la_SOURCES =						\
 
 libxfsm_4_6_la_CFLAGS =							\
 	$(LIBX11_CFLAGS)						\
-	$(LIBXFCEGUI4_CFLAGS)						\
+	$(LIBXFCE4UI_CFLAGS)						\
 	$(XFCONF_CFLAGS)
 
 libxfsm_4_6_la_LDFLAGS =						\
@@ -27,7 +27,7 @@ endif
 
 libxfsm_4_6_la_LIBADD =							\
 	$(LIBX11_LIBS)							\
-	$(LIBXFCEGUI4_LIBS)						\
+	$(LIBXFCE4UI_LIBS)						\
 	$(XFCONF_LIBS)
 
 
diff --git a/libxfsm/xfsm-util.c b/libxfsm/xfsm-util.c
index ca72078..d664d9e 100644
--- a/libxfsm/xfsm-util.c
+++ b/libxfsm/xfsm-util.c
@@ -8,12 +8,12 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
- *                                                                              
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *                                                                              
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
@@ -38,7 +38,7 @@
 
 #include <gdk/gdkx.h>
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <libxfsm/xfsm-util.h>
 
@@ -67,11 +67,11 @@ xfsm_start_application (gchar      **command,
     {
       /* setting current directory on a remote machine is not supported */
       current_directory = NULL;
-      
+
       argv[argc++] = g_strdup ("xon");
       argv[argc++] = g_strdup (client_machine);
     }
-  
+
   if (screen != NULL)
     {
       if (client_machine != NULL)
@@ -90,12 +90,12 @@ xfsm_start_application (gchar      **command,
           size *= 2;
           argv = g_realloc (argv, (size + 1) * sizeof (*argv));
         }
-      
+
       argv[argc++] = xfce_expand_variables (*command, environment);
     }
 
   argv[argc] = NULL;
-  
+
   result = g_spawn_async (current_directory,
                           argv,
                           environment,
@@ -104,9 +104,9 @@ xfsm_start_application (gchar      **command,
                           NULL,
                           NULL,
                           NULL);
-  
+
   g_strfreev (argv);
-  
+
   return result;
 }
 
@@ -151,11 +151,11 @@ void
 xfsm_window_add_border (GtkWindow *window)
 {
   GtkWidget *box1, *box2;
-  
+
   gtk_widget_realize(GTK_WIDGET(window));
 
   box1 = gtk_event_box_new ();
-  gtk_widget_modify_bg (box1, GTK_STATE_NORMAL, 
+  gtk_widget_modify_bg (box1, GTK_STATE_NORMAL,
                         &(GTK_WIDGET(window)->style->bg [GTK_STATE_SELECTED]));
   gtk_widget_show (box1);
 
diff --git a/settings/Makefile.am b/settings/Makefile.am
index 5f53ed6..ebb0770 100644
--- a/settings/Makefile.am
+++ b/settings/Makefile.am
@@ -27,7 +27,7 @@ xfce4_session_settings_CFLAGS = \
 	-DG_LOG_DOMAIN=\"xfce4-session-settings\" \
 	-I$(top_srcdir) \
 	$(LIBXFCE4UTIL_CFLAGS) \
-	$(LIBXFCEGUI4_CFLAGS) \
+	$(LIBXFCE4UI_CFLAGS) \
 	$(LIBGLADE_CFLAGS) \
 	$(XFCONF_CFLAGS) \
 	$(DBUS_GLIB_CFLAGS)
@@ -35,7 +35,7 @@ xfce4_session_settings_CFLAGS = \
 xfce4_session_settings_LDADD = \
 	$(top_builddir)/libxfsm/libxfsm-4.6.la \
 	$(LIBXFCE4UTIL_CFLAGS) \
-	$(LIBXFCEGUI4_LIBS) \
+	$(LIBXFCE4UI_LIBS) \
 	$(LIBGLADE_LIBS) \
 	$(XFCONF_LIBS) \
 	$(DBUS_GLIB_LIBS)
diff --git a/settings/main.c b/settings/main.c
index 57294d5..893248b 100644
--- a/settings/main.c
+++ b/settings/main.c
@@ -29,7 +29,6 @@
 #include <glade/glade.h>
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
 
 #include "xfae-window.h"
 #include "xfce4-session-settings-common.h"
@@ -121,7 +120,7 @@ main(int argc,
         g_object_unref(gxml);
 
         while(gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_HELP)
-            xfce_exec("xfhelp4 xfce4-session.html", FALSE, FALSE, NULL);
+            xfce_spawn_command_line_on_screen("xfhelp4 xfce4-session.html", FALSE, FALSE, NULL);
 
         gtk_widget_destroy(dialog);
     } else {
@@ -135,7 +134,7 @@ main(int argc,
         plug_child = glade_xml_get_widget(gxml, "plug-child");
         gtk_widget_reparent(plug_child, plug);
         gtk_widget_show(plug_child);
-        
+
         g_object_unref(gxml);
 
         /* Stop startup notification */
diff --git a/settings/module.c b/settings/module.c
index cabcfa4..4892f72 100644
--- a/settings/module.c
+++ b/settings/module.c
@@ -7,12 +7,12 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
- *                                                                              
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *                                                                              
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
@@ -32,7 +32,7 @@
 
 #include <gmodule.h>
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <libxfsm/xfsm-splash-engine.h>
 #include <libxfsm/xfsm-splash-rc.h>
@@ -183,7 +183,7 @@ void
 module_test (Module     *module,
              GdkDisplay *display)
 {
-  static char *steps[] = 
+  static char *steps[] =
   {
     "Starting the Window Manager",
     "Starting the Desktop Manager",
@@ -203,7 +203,7 @@ module_test (Module     *module,
   bzero (&engine, sizeof (engine));
 
   /* locate monitor with pointer */
-  screen = xfce_gdk_display_locate_monitor_with_pointer (display, &monitor);
+  screen = gdk_display_get_screen (display, monitor);
   if (G_UNLIKELY (screen == NULL))
     {
       screen  = gdk_display_get_screen (display, 0);
diff --git a/settings/session-editor.c b/settings/session-editor.c
index 2668577..dbb76be 100644
--- a/settings/session-editor.c
+++ b/settings/session-editor.c
@@ -31,7 +31,7 @@
 #include <dbus/dbus-glib.h>
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include "xfce4-session-settings-common.h"
 #include "xfce4-session-marshal.h"
@@ -190,7 +190,7 @@ session_editor_quit_client(GtkWidget *btn,
                            primary,
                            _("The application will lose any unsaved state and will not be restarted in your next session."),
                            GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                           XFCE_CUSTOM_STOCK_BUTTON, btntext, GTK_STOCK_QUIT, GTK_RESPONSE_ACCEPT,
+                           XFCE_BUTTON_TYPE_MIXED, btntext, GTK_STOCK_QUIT, GTK_RESPONSE_ACCEPT,
                            NULL) == GTK_RESPONSE_ACCEPT)
     {
         GError *error = NULL;
diff --git a/settings/splash-settings.c b/settings/splash-settings.c
index ea93944..1098f49 100644
--- a/settings/splash-settings.c
+++ b/settings/splash-settings.c
@@ -8,12 +8,12 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
- *                                                                              
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *                                                                              
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
@@ -46,7 +46,7 @@
 
 #include <glade/glade.h>
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <libxfsm/xfsm-util.h>
 #include <libxfsm/xfsm-splash-engine.h>
@@ -138,7 +138,7 @@ static void
 splash_unload_modules (void)
 {
   GList *lp;
-  
+
   if (G_LIKELY (modules != NULL))
     {
       for (lp = modules; lp != NULL; lp = lp->next)
@@ -271,7 +271,7 @@ splash_selection_changed (GtkTreeSelection *selection)
           gtk_image_set_from_pixbuf (GTK_IMAGE (splash_image), preview);
           g_object_unref (G_OBJECT (preview));
 
-          
+
           channel = xfconf_channel_get (SETTINGS_CHANNEL);
           xfconf_channel_set_string (channel, SPLASH_ENGINE_PROP, module_engine (module));
 
@@ -308,7 +308,7 @@ splash_selection_changed (GtkTreeSelection *selection)
   /* centering must be delayed! */
   if (!splash_centered)
     {
-      xfce_gtk_window_center_on_monitor_with_pointer(GTK_WINDOW(splash_dialog));
+      gtk_window_set_position(GTK_WINDOW(splash_dialog), GTK_WIN_POS_CENTER);
       splash_centered = TRUE;
     }
 }
diff --git a/settings/xfae-dialog.c b/settings/xfae-dialog.c
index 688a8c7..e98a009 100644
--- a/settings/xfae-dialog.c
+++ b/settings/xfae-dialog.c
@@ -7,12 +7,12 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
- *                                                                              
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *                                                                              
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
@@ -25,7 +25,7 @@
 
 #include "xfae-dialog.h"
 
-
+#include <libxfce4ui/libxfce4ui.h>
 
 static void xfae_dialog_init   (XfaeDialog *dialog);
 static void xfae_dialog_update (XfaeDialog *dialog);
diff --git a/settings/xfae-dialog.h b/settings/xfae-dialog.h
index 77c996e..9be885d 100644
--- a/settings/xfae-dialog.h
+++ b/settings/xfae-dialog.h
@@ -7,12 +7,12 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
- *                                                                              
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *                                                                              
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
@@ -22,7 +22,7 @@
 #ifndef __XFAE_DIALOG_H__
 #define __XFAE_DIALOG_H__
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <gtk/gtk.h>
 
 G_BEGIN_DECLS;
 
diff --git a/settings/xfae-model.c b/settings/xfae-model.c
index 057568e..0161216 100644
--- a/settings/xfae-model.c
+++ b/settings/xfae-model.c
@@ -7,12 +7,12 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
- *                                                                              
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *                                                                              
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
@@ -32,7 +32,7 @@
 
 #include "xfae-model.h"
 
-
+#include <libxfce4ui/libxfce4ui.h>
 
 typedef struct _XfaeItem XfaeItem;
 
@@ -406,6 +406,7 @@ xfae_item_new (const gchar *relpath)
   gchar      **args;
   gchar       *icon_name;
   gint         m;
+  GtkIconTheme *icon_theme;
 
   rc = xfce_rc_config_open (XFCE_RESOURCE_CONFIG, relpath, TRUE);
   if (G_LIKELY (rc != NULL))
@@ -416,6 +417,8 @@ xfae_item_new (const gchar *relpath)
       value = xfce_rc_read_entry (rc, "Type", NULL);
       if (G_LIKELY (value != NULL && g_ascii_strcasecmp (value, "Application") == 0))
         {
+          icon_theme = gtk_icon_theme_get_default ();
+
           item = g_new0 (XfaeItem, 1);
           item->relpath = g_strdup (relpath);
 
@@ -425,7 +428,7 @@ xfae_item_new (const gchar *relpath)
 
           value = xfce_rc_read_entry (rc, "Icon", NULL);
           if (G_UNLIKELY (value != NULL))
-            item->icon = xfce_themed_icon_load (value, 16);
+            item->icon = gtk_icon_theme_load_icon (icon_theme, value, 16, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
           else
             {
               /* we try to be smart here in that we try to guess
@@ -439,7 +442,7 @@ xfae_item_new (const gchar *relpath)
                   if (G_LIKELY (*args != NULL))
                     {
                       icon_name = g_path_get_basename (*args);
-                      item->icon = xfce_themed_icon_load (icon_name, 16);
+                      item->icon = gtk_icon_theme_load_icon (icon_theme, icon_name, 16, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
                       g_free (icon_name);
                     }
                   g_strfreev (args);
diff --git a/settings/xfae-model.h b/settings/xfae-model.h
index e4a88b9..99b4e2e 100644
--- a/settings/xfae-model.h
+++ b/settings/xfae-model.h
@@ -7,12 +7,12 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
- *                                                                              
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *                                                                              
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
@@ -22,7 +22,7 @@
 #ifndef __XFAE_MODEL_H__
 #define __XFAE_MODEL_H__
 
-#include <libxfcegui4/libxfcegui4.h>
+#include <gtk/gtk.h>
 
 G_BEGIN_DECLS;
 
diff --git a/settings/xfae-window.c b/settings/xfae-window.c
index 0f0d194..269dfef 100644
--- a/settings/xfae-window.c
+++ b/settings/xfae-window.c
@@ -8,12 +8,12 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
- *                                                                              
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *                                                                              
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
@@ -24,11 +24,13 @@
 #include <config.h>
 #endif
 
+#include "xfae-window.h"
 #include "xfae-dialog.h"
 #include "xfae-model.h"
-#include "xfae-window.h"
-
 
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
 
 static void     xfae_window_add                 (XfaeWindow       *window);
 static void     xfae_window_remove              (XfaeWindow       *window);
@@ -274,7 +276,7 @@ xfae_window_add (XfaeWindow *window)
       model = gtk_tree_view_get_model (GTK_TREE_VIEW (window->treeview));
       if (!xfae_model_add (XFAE_MODEL (model), name, descr, command, &error))
         {
-          xfce_err (error->message);
+          xfce_dialog_show_error (0, error, _("Error"));
           g_error_free (error);
         }
 
@@ -300,7 +302,7 @@ xfae_window_remove (XfaeWindow *window)
     {
       if (!xfae_model_remove (XFAE_MODEL (model), &iter, &error))
         {
-          xfce_err (error->message);
+          xfce_dialog_show_error (0, error, _("Error"));
           g_error_free (error);
         }
     }
@@ -323,7 +325,7 @@ xfae_window_item_toggled (XfaeWindow *window,
     {
       if (!xfae_model_toggle (XFAE_MODEL (model), &iter, &error))
         {
-          xfce_err (error->message);
+          xfce_dialog_show_error (0, error, _("Error"));
           g_error_free (error);
         }
     }
@@ -368,11 +370,11 @@ xfae_window_new (void)
 /**
  * xfae_window_create_plug_child:
  *
- * Creates a widget that can be used to embed the window contents 
+ * Creates a widget that can be used to embed the window contents
  * into a GtkPlug widget. After this function call, the XfaeWindow can
  * no longer be used and has to be re-created.
  *
- * Return value: A widget holding the most important contents of the 
+ * Return value: A widget holding the most important contents of the
  *               window.
  **/
 GtkWidget*
diff --git a/xfce4-session/Makefile.am b/xfce4-session/Makefile.am
index 7e6cbb0..3ef80d9 100644
--- a/xfce4-session/Makefile.am
+++ b/xfce4-session/Makefile.am
@@ -55,7 +55,7 @@ xfce4_session_CFLAGS =							\
 	$(GNOME_KEYRING_CFLAGS)						\
 	$(LIBSM_CFLAGS)							\
 	$(LIBX11_CFLAGS)						\
-	$(LIBXFCEGUI4_CFLAGS)						\
+	$(LIBXFCE4UI_CFLAGS)						\
 	$(DBUS_CFLAGS)							\
 	$(DBUS_GLIB_CFLAGS)						\
 	$(LIBWNCK_CFLAGS)						\
@@ -73,7 +73,7 @@ xfce4_session_LDADD =							\
 	$(LIBSM_LIBS)							\
 	$(LIBX11_LDFLAGS)						\
 	$(LIBX11_LIBS)							\
-	$(LIBXFCEGUI4_LIBS)						\
+	$(LIBXFCE4UI_LIBS)						\
 	$(DBUS_LIBS)							\
 	$(DBUS_GLIB_LIBS)						\
 	$(LIBWNCK_LIBS)							\
diff --git a/xfce4-session/main.c b/xfce4-session/main.c
index f5f2295..cb13d30 100644
--- a/xfce4-session/main.c
+++ b/xfce4-session/main.c
@@ -55,7 +55,7 @@
 #include <gtk/gtk.h>
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
 
 #include <libxfsm/xfsm-util.h>
 
diff --git a/xfce4-session/shutdown.c b/xfce4-session/shutdown.c
index cbb3b7b..96252e8 100644
--- a/xfce4-session/shutdown.c
+++ b/xfce4-session/shutdown.c
@@ -54,7 +54,6 @@
 #endif
 
 #include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
 #include <gtk/gtk.h>
 
 #include <libxfsm/xfsm-util.h>
@@ -170,6 +169,7 @@ shutdownDialog(const gchar *sessionName, XfsmShutdownType *shutdownType, gboolea
 {
   gboolean accessibility;
   XfsmFadeout *fadeout = NULL;
+  GdkDisplay *display;
   GdkScreen *screen;
   GtkWidget *dialog;
   GtkWidget *label;
@@ -263,8 +263,10 @@ shutdownDialog(const gchar *sessionName, XfsmShutdownType *shutdownType, gboolea
    */
   gtk_rc_reparse_all ();
 
+  display = gdk_display_get_default();
+
   /* get screen with pointer */
-  screen = xfce_gdk_display_locate_monitor_with_pointer (NULL, &monitor);
+  screen = gdk_display_get_screen(display, monitor);
   if (screen == NULL)
     {
       screen = gdk_screen_get_default ();
@@ -549,7 +551,7 @@ shutdownDialog(const gchar *sessionName, XfsmShutdownType *shutdownType, gboolea
     xfsm_window_add_border (GTK_WINDOW (dialog));
   
   /* center dialog on target monitor */
-  xfce_gtk_window_center_on_monitor (GTK_WINDOW (dialog), screen, monitor);
+  gtk_window_center_on_monitor (GTK_WINDOW (dialog), screen, monitor);
 
   /* save portion of the root window covered by the dialog */
   if (!accessibility && shutdown_helper != NULL)



More information about the Xfce4-commits mailing list