Author: nick
Date: 2008-07-18 23:27:06 +0000 (Fri, 18 Jul 2008)
New Revision: 27347

Added:
   xfce4-settings/trunk/xfce4-settings-helper/displays.c
   xfce4-settings/trunk/xfce4-settings-helper/displays.h
Modified:
   xfce4-settings/trunk/ChangeLog
   xfce4-settings/trunk/xfce4-settings-helper/Makefile.am
   xfce4-settings/trunk/xfce4-settings-helper/accessibility.c
   xfce4-settings/trunk/xfce4-settings-helper/keyboards.c
   xfce4-settings/trunk/xfce4-settings-helper/main.c
   xfce4-settings/trunk/xfce4-settings-helper/pointers.c
Log:
        * xfce4-settings-helper/Makefile.am, xfce4-settings-helper/main.c,
          xfce4-settings-helper/keyboards.c/h: Add basic gobject stuff.
        * xfce4-settings-helper/accessibility.c, 
          xfce4-settings-helper/keyboards.c,
          xfce4-settings-helper/pointers.c: Fix some indentation.

Modified: xfce4-settings/trunk/ChangeLog
===================================================================
--- xfce4-settings/trunk/ChangeLog      2008-07-18 22:40:02 UTC (rev 27346)
+++ xfce4-settings/trunk/ChangeLog      2008-07-18 23:27:06 UTC (rev 27347)
@@ -1,5 +1,13 @@
 2008-07-18     Nick Schermer <[EMAIL PROTECTED]>
 
+       * xfce4-settings-helper/Makefile.am, xfce4-settings-helper/main.c,
+         xfce4-settings-helper/keyboards.c/h: Add basic gobject stuff.
+       * xfce4-settings-helper/accessibility.c, 
+         xfce4-settings-helper/keyboards.c,
+         xfce4-settings-helper/pointers.c: Fix some indentation.
+
+2008-07-18     Nick Schermer <[EMAIL PROTECTED]>
+
        * configure.ac.in, xfce4-settings-helper/Makefile.am,
          xfce4-settings-helper/keyboards.c: Drop libxxf86misc dependency.
          Xkb can do all this, it's not needed anymore and already

Modified: xfce4-settings/trunk/xfce4-settings-helper/Makefile.am
===================================================================
--- xfce4-settings/trunk/xfce4-settings-helper/Makefile.am      2008-07-18 
22:40:02 UTC (rev 27346)
+++ xfce4-settings/trunk/xfce4-settings-helper/Makefile.am      2008-07-18 
23:27:06 UTC (rev 27347)
@@ -16,6 +16,8 @@
        main.c \
        accessibility.c \
        accessibility.h \
+       displays.c \
+       displays.h \
        keyboards.c \
        keyboards.h \
        keyboard-shortcuts.c \
@@ -32,7 +34,9 @@
        $(LIBXFCE4UTIL_CFLAGS) \
        $(LIBXFCEGUI4_CFLAGS) \
        $(XI_CFLAGS) \
-       $(LIBX11_CFLAGS)
+       $(LIBX11_CFLAGS) \
+       $(XRANDR_CFLAGS) \
+       $(XXF86VM_CFLAGS)
 
 xfce4_settings_helper_LDFLAGS = \
        -no-undefined \
@@ -47,7 +51,9 @@
        $(LIBXFCE4UTIL_LIBS) \
        $(LIBXFCEGUI4_LIBS) \
        $(XI_LIBS) \
-       $(LIBX11_LIBS)
+       $(LIBX11_LIBS) \
+       $(XRANDR_LIBS) \
+       $(XXF86VM_LIBS)
 
 if HAVE_LIBNOTIFY
 xfce4_settings_helper_CFLAGS += \

Modified: xfce4-settings/trunk/xfce4-settings-helper/accessibility.c
===================================================================
--- xfce4-settings/trunk/xfce4-settings-helper/accessibility.c  2008-07-18 
22:40:02 UTC (rev 27346)
+++ xfce4-settings/trunk/xfce4-settings-helper/accessibility.c  2008-07-18 
23:27:06 UTC (rev 27347)
@@ -102,10 +102,10 @@
 static void
 xfce_accessibility_helper_class_init (XfceAccessibilityHelperClass *klass)
 {
-  GObjectClass *gobject_class;
+    GObjectClass *gobject_class;
 
-  gobject_class = G_OBJECT_CLASS (klass);
-  gobject_class->finalize = xfce_accessibility_helper_finalize;
+    gobject_class = G_OBJECT_CLASS (klass);
+    gobject_class->finalize = xfce_accessibility_helper_finalize;
 }
 
 

Added: xfce4-settings/trunk/xfce4-settings-helper/displays.c
===================================================================
--- xfce4-settings/trunk/xfce4-settings-helper/displays.c                       
        (rev 0)
+++ xfce4-settings/trunk/xfce4-settings-helper/displays.c       2008-07-18 
23:27:06 UTC (rev 27347)
@@ -0,0 +1,114 @@
+/* $Id$ */
+/*
+ *  Copyright (c) 2008 Nick Schermer <[EMAIL PROTECTED]>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, 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 Library 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 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include <X11/Xlib.h>
+#include <X11/extensions/randr.h>
+#include <X11/extensions/Xrandr.h>
+#include <X11/extensions/xf86vmode.h>
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <xfconf/xfconf.h>
+
+#include "displays.h"
+
+
+
+static void            xfce_displays_helper_class_init                     
(XfceDisplaysHelperClass *klass);
+static void            xfce_displays_helper_init                           
(XfceDisplaysHelper      *helper);
+static void            xfce_displays_helper_finalize                       
(GObject                 *object);
+static void            xfce_displays_helper_channel_property_changed       
(XfconfChannel           *channel,
+                                                                            
const gchar             *property_name,
+                                                                            
const GValue            *value,
+                                                                            
XfceDisplaysHelper      *helper);
+
+
+
+struct _XfceDisplaysHelperClass
+{
+    GObjectClass __parent__;
+};
+
+struct _XfceDisplaysHelper
+{
+    GObject  __parent__;
+
+    /* xfconf channel */
+    XfconfChannel *channel;
+};
+
+
+
+G_DEFINE_TYPE (XfceDisplaysHelper, xfce_displays_helper, G_TYPE_OBJECT);
+
+
+
+static void
+xfce_displays_helper_class_init (XfceDisplaysHelperClass *klass)
+{
+    GObjectClass *gobject_class;
+
+    gobject_class = G_OBJECT_CLASS (klass);
+    gobject_class->finalize = xfce_displays_helper_finalize;
+}
+
+
+
+static void
+xfce_displays_helper_init (XfceDisplaysHelper *helper)
+{
+    /* open the channel */
+    helper->channel = xfconf_channel_new ("displays");
+    
+    /* monitor channel changes */
+    g_signal_connect (G_OBJECT (helper->channel), "property-changed", 
G_CALLBACK (xfce_displays_helper_channel_property_changed), helper);
+}
+
+
+
+static void
+xfce_displays_helper_finalize (GObject *object)
+{
+    XfceDisplaysHelper *helper = XFCE_DISPLAYS_HELPER (object);
+
+    /* release the channel */
+    if (G_LIKELY (helper->channel))
+        g_object_unref (G_OBJECT (helper->channel));
+
+    (*G_OBJECT_CLASS (xfce_displays_helper_parent_class)->finalize) (object);
+}
+
+
+
+static void            
+xfce_displays_helper_channel_property_changed (XfconfChannel      *channel,
+                                               const gchar        
*property_name,
+                                               const GValue       *value,
+                                               XfceDisplaysHelper *helper)
+{
+    
+}


Property changes on: xfce4-settings/trunk/xfce4-settings-helper/displays.c
___________________________________________________________________
Name: svn:keywords
   + Id

Added: xfce4-settings/trunk/xfce4-settings-helper/displays.h
===================================================================
--- xfce4-settings/trunk/xfce4-settings-helper/displays.h                       
        (rev 0)
+++ xfce4-settings/trunk/xfce4-settings-helper/displays.h       2008-07-18 
23:27:06 UTC (rev 27347)
@@ -0,0 +1,35 @@
+/* $Id$ */
+/*
+ *  Copyright (c) 2008 Nick Schermer <[EMAIL PROTECTED]>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, 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 Library 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 02111-1307, USA.
+ */
+
+#ifndef __DISPLAYS_H__
+#define __DISPLAYS_H__
+
+typedef struct _XfceDisplaysHelperClass XfceDisplaysHelperClass;
+typedef struct _XfceDisplaysHelper      XfceDisplaysHelper;
+
+#define XFCE_TYPE_DISPLAYS_HELPER            (xfce_displays_helper_get_type ())
+#define XFCE_DISPLAYS_HELPER(obj)            (G_TYPE_CHECK_INSTANCE_CAST 
((obj), XFCE_TYPE_DISPLAYS_HELPER, XfceDisplaysHelper))
+#define XFCE_DISPLAYS_HELPER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST 
((klass), XFCE_TYPE_DISPLAYS_HELPER, XfceDisplaysHelperClass))
+#define XFCE_IS_DISPLAYS_HELPER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE 
((obj), XFCE_TYPE_DISPLAYS_HELPER))
+#define XFCE_IS_DISPLAYS_HELPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE 
((klass), XFCE_TYPE_DISPLAYS_HELPER))
+#define XFCE_DISPLAYS_HELPER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS 
((obj), XFCE_TYPE_DISPLAYS_HELPER, XfceDisplaysHelperClass))
+
+GType xfce_displays_helper_get_type (void) G_GNUC_CONST;
+
+#endif /* !__DISPLAYS_H__ */


Property changes on: xfce4-settings/trunk/xfce4-settings-helper/displays.h
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: xfce4-settings/trunk/xfce4-settings-helper/keyboards.c
===================================================================
--- xfce4-settings/trunk/xfce4-settings-helper/keyboards.c      2008-07-18 
22:40:02 UTC (rev 27346)
+++ xfce4-settings/trunk/xfce4-settings-helper/keyboards.c      2008-07-18 
23:27:06 UTC (rev 27347)
@@ -78,10 +78,10 @@
 static void
 xfce_keyboards_helper_class_init (XfceKeyboardsHelperClass *klass)
 {
-  GObjectClass *gobject_class;
+    GObjectClass *gobject_class;
 
-  gobject_class = G_OBJECT_CLASS (klass);
-  gobject_class->finalize = xfce_keyboards_helper_finalize;
+    gobject_class = G_OBJECT_CLASS (klass);
+    gobject_class->finalize = xfce_keyboards_helper_finalize;
 }
 
 

Modified: xfce4-settings/trunk/xfce4-settings-helper/main.c
===================================================================
--- xfce4-settings/trunk/xfce4-settings-helper/main.c   2008-07-18 22:40:02 UTC 
(rev 27346)
+++ xfce4-settings/trunk/xfce4-settings-helper/main.c   2008-07-18 23:27:06 UTC 
(rev 27347)
@@ -43,6 +43,7 @@
 #include <libxfce4util/libxfce4util.h>
 
 #include "accessibility.h"
+#include "displays.h"
 #include "pointers.h"
 #include "keyboards.h"
 #include "keyboard-shortcuts.h"
@@ -77,6 +78,7 @@
     GObject    *keyboards_helper;
     GObject    *accessibility_helper;
     GObject    *shortcuts_helper;
+    GObject    *displays_helper;
     pid_t       pid;
     guint       i;
     const gint  signums[] = { SIGHUP, SIGINT, SIGQUIT, SIGTERM };
@@ -154,6 +156,7 @@
     keyboards_helper = g_object_new (XFCE_TYPE_KEYBOARDS_HELPER, NULL);
     accessibility_helper = g_object_new (XFCE_TYPE_ACCESSIBILITY_HELPER, NULL);
     shortcuts_helper = g_object_new (XFCE_TYPE_KEYBOARD_SHORTCUTS_HELPER, 
NULL);
+    displays_helper = g_object_new (XFCE_TYPE_DISPLAYS_HELPER, NULL);
 
     /* setup signal handlers to properly quit the main loop */
     for (i = 0; i < G_N_ELEMENTS (signums); i++)
@@ -167,6 +170,7 @@
     g_object_unref (G_OBJECT (keyboards_helper));
     g_object_unref (G_OBJECT (accessibility_helper));
     g_object_unref (G_OBJECT (shortcuts_helper));
+    g_object_unref (G_OBJECT (displays_helper));
 
     /* shutdown xfconf */
     xfconf_shutdown ();

Modified: xfce4-settings/trunk/xfce4-settings-helper/pointers.c
===================================================================
--- xfce4-settings/trunk/xfce4-settings-helper/pointers.c       2008-07-18 
22:40:02 UTC (rev 27346)
+++ xfce4-settings/trunk/xfce4-settings-helper/pointers.c       2008-07-18 
23:27:06 UTC (rev 27347)
@@ -131,10 +131,10 @@
 static void
 xfce_pointers_helper_class_init (XfcePointersHelperClass *klass)
 {
-  GObjectClass *gobject_class;
+    GObjectClass *gobject_class;
 
-  gobject_class = G_OBJECT_CLASS (klass);
-  gobject_class->finalize = xfce_pointers_helper_finalize;
+    gobject_class = G_OBJECT_CLASS (klass);
+    gobject_class->finalize = xfce_pointers_helper_finalize;
 }
 
 

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to