Logo Search packages:      
Sourcecode: gnome-compiz-manager version File versions

gcp-page-config.c

/* Generated by GOB (v2.0.14)   (do not edit directly) */

/* End world hunger, donate to the World Food Programme, http://www.wfp.org */

#define GOB_VERSION_MAJOR 2
#define GOB_VERSION_MINOR 0
#define GOB_VERSION_PATCHLEVEL 14

#define selfp (self->_priv)

#include <string.h> /* memset() */

#include "gcp-page-config.h"

#ifdef G_LIKELY
#define ___GOB_LIKELY(expr) G_LIKELY(expr)
#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
#else /* ! G_LIKELY */
#define ___GOB_LIKELY(expr) (expr)
#define ___GOB_UNLIKELY(expr) (expr)
#endif /* G_LIKELY */

#line 33 "gcp-page-config.gob"

#include <config.h>
#include <gnome.h>
#include <libgnome/gnome-desktop-item.h>

#include "gcm-classic-desktop.h"
#include "gcm-application.h"
#include "gcm-config.h"
      
/* For testing propose use the local (not installed) glade file */
#define GCP_PAGE_CONFIG_GLADE_FILE PACKAGE_DATA_DIR"/gnome-compiz-manager/glade/gnome-compiz-preferences.glade"
/*#define GCP_PAGE_CONFIG_GLADE_FILE "data/gnome-compiz-preferences.glade" */

#define REVERT_COUNT 40

struct TimeoutData
{
    int time;
    GtkLabel *label;
    GtkDialog *dialog;
    gboolean timed_out;
};

#line 48 "gcp-page-config.c"
/* self casting macros */
#define SELF(x) GCP_PAGE_CONFIG(x)
#define SELF_CONST(x) GCP_PAGE_CONFIG_CONST(x)
#define IS_SELF(x) GCP_IS_PAGE_CONFIG(x)
#define TYPE_SELF GCP_TYPE_PAGE_CONFIG
#define SELF_CLASS(x) GCP_PAGE_CONFIG_CLASS(x)

#define SELF_GET_CLASS(x) GCP_PAGE_CONFIG_GET_CLASS(x)

/* self typedefs */
typedef GCPPageConfig Self;
typedef GCPPageConfigClass SelfClass;

struct _GCPPageConfigPrivate {
#line 0 "gcp-page-config.gob"
      GladeXML * _glade_xml;
#line 59 "gcp-page-config.gob"
      GCMGLDesktop * gl_desktop;
#line 61 "gcp-page-config.gob"
      GCMClassicDesktop * classic_desktop;
#line 63 "gcp-page-config.gob"
      GCMApplication * tray_icon;
#line 65 "gcp-page-config.gob"
      GCMApplication * gnome_themes_manager;
#line 67 "gcp-page-config.gob"
      GtkLabel * label_graphic_card;
#line 68 "gcp-page-config.gob"
      GtkBox * configure_xorg_warning_hbox;
#line 69 "gcp-page-config.gob"
      GtkBox * metacity_opacity_vbox;
#line 70 "gcp-page-config.gob"
      GtkButton * configure_xorg_button;
#line 71 "gcp-page-config.gob"
      GtkButton * themes_button;
#line 72 "gcp-page-config.gob"
      GtkCheckButton * enable_gl_desktop_checkbutton;
#line 73 "gcp-page-config.gob"
      GtkCheckButton * use_metacity_theme_checkbutton;
#line 74 "gcp-page-config.gob"
      GtkCheckButton * tray_icon_checkbutton;
#line 75 "gcp-page-config.gob"
      GtkAlignment * metacity_theme_alignment;
#line 76 "gcp-page-config.gob"
      GtkScale * metacity_active_window_opacity_hscale;
#line 77 "gcp-page-config.gob"
      GtkScale * metacity_theme_opacity_hscale;
#line 78 "gcp-page-config.gob"
      GtkCheckButton * metacity_theme_shade_opacity_checkbutton;
#line 79 "gcp-page-config.gob"
      GtkCheckButton * active_window_opacity_shade_checkbutton;
#line 80 "gcp-page-config.gob"
      GtkFrame * window_decorator_frame;
#line 101 "gcp-page-config.c"
};
/* here are local prototypes */
static void gcp_page_config_init (GCPPageConfig * o) G_GNUC_UNUSED;
static void gcp_page_config_class_init (GCPPageConfigClass * klass) G_GNUC_UNUSED;
void  gcp_page_config_on_enable_gl_desktop_checkbutton_toggled    (GCPPageConfig * self, GtkWidget * checkbutton);
static void gcp_page_config_enable_gl_desktop_changed (GConfClient * client, guint cnxn_id, GConfEntry * entry, GCPPageConfig * self) G_GNUC_UNUSED;
static void gcp_page_config_init_enable_gl_desktop (GCPPageConfig * self) G_GNUC_UNUSED;
void  gcp_page_config_on_tray_icon_checkbutton_toggled      (GCPPageConfig * self, GtkWidget * checkbutton);
static void gcp_page_config_tray_icon_changed (GConfClient * client, guint cnxn_id, GConfEntry * entry, GCPPageConfig * self) G_GNUC_UNUSED;
static void gcp_page_config_init_tray_icon (GCPPageConfig * self) G_GNUC_UNUSED;
void  gcp_page_config_on_use_metacity_theme_checkbutton_toggled   (GCPPageConfig * self, GtkWidget * checkbutton);
static void gcp_page_config_use_metacity_theme_changed (GConfClient * client, guint cnxn_id, GConfEntry * entry, GCPPageConfig * self) G_GNUC_UNUSED;
void  gcp_page_config_on_metacity_theme_opacity_hscale_value_changed    (GCPPageConfig * self, GtkRange * range);
void  gcp_page_config_on_metacity_active_window_opacity_hscale_value_changed  (GCPPageConfig * self, GtkRange * range);
void  gcp_page_config_on_metacity_theme_shade_opacity_checkbutton_toggled     (GCPPageConfig * self, GtkButton * button);
void  gcp_page_config_on_active_window_spacity_shade_checkbutton_toggled      (GCPPageConfig * self, GtkButton * button);
static void gcp_page_config_init_theme (GCPPageConfig * self) G_GNUC_UNUSED;
void  gcp_page_config_on_themes_button_clicked  (GCPPageConfig * self);
void  gcp_page_config_on_configure_xorg_button_clicked      (GCPPageConfig * self, GtkButton * button);
static void gcp_page_config_gl_desktop_autostart (GCPPageConfig * self, gboolean enable) G_GNUC_UNUSED;
static gchar * gcp_page_config_get_gconf_description (GCPPageConfig * self, gchar * key) G_GNUC_UNUSED;
static gboolean gcp_page_config_free_at_idle (gpointer data) G_GNUC_UNUSED;
static char * gcp_page_config_idle_free (char * str) G_GNUC_UNUSED;
static char * gcp_page_config_timeout_string (int time) G_GNUC_UNUSED;
static gboolean gcp_page_config_save_timeout_callback (gpointer _data) G_GNUC_UNUSED;
static gboolean gcp_page_config_run_timed_dialog (GCPPageConfig * self) G_GNUC_UNUSED;

/*
 * Signal connection wrapper macro shortcuts
 */
#define self_connect__gl_desktop_changed(object,func,data)  gcp_page_config_connect__gl_desktop_changed((object),(func),(data))
#define self_connect_after__gl_desktop_changed(object,func,data)  gcp_page_config_connect_after__gl_desktop_changed((object),(func),(data))
#define self_connect_data__gl_desktop_changed(object,func,data,destroy_data,flags)  gcp_page_config_connect_data__gl_desktop_changed((object),(func),(data),(destroy_data),(flags))

typedef void  (*___Sig1) (GCPPageConfig *, gboolean , gpointer);

static void
___marshal_Sig1 (GClosure *closure,
      GValue *return_value G_GNUC_UNUSED,
      guint n_param_values,
      const GValue *param_values,
      gpointer invocation_hint G_GNUC_UNUSED,
      gpointer marshal_data)
{
      register ___Sig1 callback;
      register GCClosure *cc = (GCClosure*) closure;
      register gpointer data1, data2;

      g_return_if_fail (n_param_values == 2);

      if (G_CCLOSURE_SWAP_DATA (closure)) {
            data1 = closure->data;
            data2 = g_value_peek_pointer (param_values + 0);
      } else {
            data1 = g_value_peek_pointer (param_values + 0);
            data2 = closure->data;
      }

      callback = (___Sig1) (marshal_data != NULL ? marshal_data : cc->callback);

      callback ((GCPPageConfig *)data1,
            (gboolean ) g_value_get_boolean (param_values + 1),
            data2);
}


enum {
      GL_DESKTOP_CHANGED_SIGNAL,
      LAST_SIGNAL
};

static guint object_signals[LAST_SIGNAL] = {0};

/* pointer to the class of our parent */
static GtkFrameClass *parent_class = NULL;

/* Short form macros */
#define self_gl_desktop_changed gcp_page_config_gl_desktop_changed
#define self_new gcp_page_config_new
#define self_on_enable_gl_desktop_checkbutton_toggled gcp_page_config_on_enable_gl_desktop_checkbutton_toggled
#define self_enable_gl_desktop_changed gcp_page_config_enable_gl_desktop_changed
#define self_init_enable_gl_desktop gcp_page_config_init_enable_gl_desktop
#define self_on_tray_icon_checkbutton_toggled gcp_page_config_on_tray_icon_checkbutton_toggled
#define self_tray_icon_changed gcp_page_config_tray_icon_changed
#define self_init_tray_icon gcp_page_config_init_tray_icon
#define self_on_use_metacity_theme_checkbutton_toggled gcp_page_config_on_use_metacity_theme_checkbutton_toggled
#define self_use_metacity_theme_changed gcp_page_config_use_metacity_theme_changed
#define self_on_metacity_theme_opacity_hscale_value_changed gcp_page_config_on_metacity_theme_opacity_hscale_value_changed
#define self_on_metacity_active_window_opacity_hscale_value_changed gcp_page_config_on_metacity_active_window_opacity_hscale_value_changed
#define self_on_metacity_theme_shade_opacity_checkbutton_toggled gcp_page_config_on_metacity_theme_shade_opacity_checkbutton_toggled
#define self_on_active_window_spacity_shade_checkbutton_toggled gcp_page_config_on_active_window_spacity_shade_checkbutton_toggled
#define self_init_theme gcp_page_config_init_theme
#define self_on_themes_button_clicked gcp_page_config_on_themes_button_clicked
#define self_on_configure_xorg_button_clicked gcp_page_config_on_configure_xorg_button_clicked
#define self_gl_desktop_autostart gcp_page_config_gl_desktop_autostart
#define self_get_gconf_description gcp_page_config_get_gconf_description
#define self_free_at_idle gcp_page_config_free_at_idle
#define self_idle_free gcp_page_config_idle_free
#define self_timeout_string gcp_page_config_timeout_string
#define self_save_timeout_callback gcp_page_config_save_timeout_callback
#define self_run_timed_dialog gcp_page_config_run_timed_dialog
GType
gcp_page_config_get_type (void)
{
      static GType type = 0;

      if ___GOB_UNLIKELY(type == 0) {
            static const GTypeInfo info = {
                  sizeof (GCPPageConfigClass),
                  (GBaseInitFunc) NULL,
                  (GBaseFinalizeFunc) NULL,
                  (GClassInitFunc) gcp_page_config_class_init,
                  (GClassFinalizeFunc) NULL,
                  NULL /* class_data */,
                  sizeof (GCPPageConfig),
                  0 /* n_preallocs */,
                  (GInstanceInitFunc) gcp_page_config_init,
                  NULL
            };

            type = g_type_register_static (GTK_TYPE_FRAME, "GCPPageConfig", &info, (GTypeFlags)0);
      }

      return type;
}

/* a macro for creating a new object of our type */
#define GET_NEW ((GCPPageConfig *)g_object_new(gcp_page_config_get_type(), NULL))

/* a function for creating a new object of our type */
#include <stdarg.h>
static GCPPageConfig * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
static GCPPageConfig *
GET_NEW_VARG (const char *first, ...)
{
      GCPPageConfig *ret;
      va_list ap;
      va_start (ap, first);
      ret = (GCPPageConfig *)g_object_new_valist (gcp_page_config_get_type (), first, ap);
      va_end (ap);
      return ret;
}

/* a function to connect glade callback */
static void
___glade_xml_connect_foreach(const gchar *handler_name,
GObject *object,
const gchar *signal_name,
const gchar *signal_data,
GObject *connect_object,
gboolean after,
gpointer user_data)
{
      static GModule * allsymbols = NULL;
      
      if (!allsymbols) allsymbols = g_module_open(NULL, 0);
      if (allsymbols) {
            gchar * func_name = g_strdup_printf("gcp_page_config_%s", handler_name);
            GCallback func;

            if (!g_module_symbol(allsymbols, func_name, (gpointer)&func)){
                  if (!g_module_symbol(allsymbols, handler_name, (gpointer)&func)) {
                        g_warning("could not find signal handler '%s'.", func_name);
                        g_free(func_name);
                        return;
                  }
            }
            if (after)
                  g_signal_connect_data(object, signal_name, func, user_data, NULL, G_CONNECT_AFTER | G_CONNECT_SWAPPED);
            else
                  g_signal_connect_data(object, signal_name, func, user_data, NULL, G_CONNECT_SWAPPED);
            g_free(func_name);
      }
}


static void
___finalize(GObject *obj_self)
{
#define __GOB_FUNCTION__ "GCP:Page:Config::finalize"
      GCPPageConfig *self G_GNUC_UNUSED = GCP_PAGE_CONFIG (obj_self);
      gpointer priv G_GNUC_UNUSED = self->_priv;
      if(G_OBJECT_CLASS(parent_class)->finalize) \
            (* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
      if(self->_priv->_glade_xml) { g_object_unref ((gpointer) self->_priv->_glade_xml); self->_priv->_glade_xml = NULL; }
#line 60 "gcp-page-config.gob"
      if(self->_priv->gl_desktop) { g_object_unref ((gpointer) self->_priv->gl_desktop); self->_priv->gl_desktop = NULL; }
#line 289 "gcp-page-config.c"
#line 62 "gcp-page-config.gob"
      if(self->_priv->classic_desktop) { g_object_unref ((gpointer) self->_priv->classic_desktop); self->_priv->classic_desktop = NULL; }
#line 292 "gcp-page-config.c"
#line 64 "gcp-page-config.gob"
      if(self->_priv->tray_icon) { g_object_unref ((gpointer) self->_priv->tray_icon); self->_priv->tray_icon = NULL; }
#line 295 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->gnome_themes_manager) { g_object_unref ((gpointer) self->_priv->gnome_themes_manager); self->_priv->gnome_themes_manager = NULL; }
#line 298 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->label_graphic_card) { g_object_unref ((gpointer) self->_priv->label_graphic_card); self->_priv->label_graphic_card = NULL; }
#line 301 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->configure_xorg_warning_hbox) { g_object_unref ((gpointer) self->_priv->configure_xorg_warning_hbox); self->_priv->configure_xorg_warning_hbox = NULL; }
#line 304 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->metacity_opacity_vbox) { g_object_unref ((gpointer) self->_priv->metacity_opacity_vbox); self->_priv->metacity_opacity_vbox = NULL; }
#line 307 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->configure_xorg_button) { g_object_unref ((gpointer) self->_priv->configure_xorg_button); self->_priv->configure_xorg_button = NULL; }
#line 310 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->themes_button) { g_object_unref ((gpointer) self->_priv->themes_button); self->_priv->themes_button = NULL; }
#line 313 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->enable_gl_desktop_checkbutton) { g_object_unref ((gpointer) self->_priv->enable_gl_desktop_checkbutton); self->_priv->enable_gl_desktop_checkbutton = NULL; }
#line 316 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->use_metacity_theme_checkbutton) { g_object_unref ((gpointer) self->_priv->use_metacity_theme_checkbutton); self->_priv->use_metacity_theme_checkbutton = NULL; }
#line 319 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->tray_icon_checkbutton) { g_object_unref ((gpointer) self->_priv->tray_icon_checkbutton); self->_priv->tray_icon_checkbutton = NULL; }
#line 322 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->metacity_theme_alignment) { g_object_unref ((gpointer) self->_priv->metacity_theme_alignment); self->_priv->metacity_theme_alignment = NULL; }
#line 325 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->metacity_active_window_opacity_hscale) { g_object_unref ((gpointer) self->_priv->metacity_active_window_opacity_hscale); self->_priv->metacity_active_window_opacity_hscale = NULL; }
#line 328 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->metacity_theme_opacity_hscale) { g_object_unref ((gpointer) self->_priv->metacity_theme_opacity_hscale); self->_priv->metacity_theme_opacity_hscale = NULL; }
#line 331 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->metacity_theme_shade_opacity_checkbutton) { g_object_unref ((gpointer) self->_priv->metacity_theme_shade_opacity_checkbutton); self->_priv->metacity_theme_shade_opacity_checkbutton = NULL; }
#line 334 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->active_window_opacity_shade_checkbutton) { g_object_unref ((gpointer) self->_priv->active_window_opacity_shade_checkbutton); self->_priv->active_window_opacity_shade_checkbutton = NULL; }
#line 337 "gcp-page-config.c"
#line 66 "gcp-page-config.gob"
      if(self->_priv->window_decorator_frame) { g_object_unref ((gpointer) self->_priv->window_decorator_frame); self->_priv->window_decorator_frame = NULL; }
#line 340 "gcp-page-config.c"
}
#undef __GOB_FUNCTION__

static void 
gcp_page_config_init (GCPPageConfig * o G_GNUC_UNUSED)
{
#define __GOB_FUNCTION__ "GCP:Page:Config::init"
      o->_priv = G_TYPE_INSTANCE_GET_PRIVATE(o,GCP_TYPE_PAGE_CONFIG,GCPPageConfigPrivate);
      {
      GtkWidget * root;
      o->_priv->_glade_xml = glade_xml_new(GCP_PAGE_CONFIG_GLADE_FILE, "configuration_page", NULL);
      root = glade_xml_get_widget(o->_priv->_glade_xml, "configuration_page");
      gtk_widget_show(root);
      gtk_container_add(GTK_CONTAINER(o), root);
      glade_xml_signal_autoconnect_full(o->_priv->_glade_xml, (GladeXMLConnectFunc)___glade_xml_connect_foreach, (gpointer)o);
}
      o->_priv->label_graphic_card = (GtkLabel * )glade_xml_get_widget(o->_priv->_glade_xml, "label_graphic_card");
      o->_priv->configure_xorg_warning_hbox = (GtkBox * )glade_xml_get_widget(o->_priv->_glade_xml, "configure_xorg_warning_hbox");
      o->_priv->metacity_opacity_vbox = (GtkBox * )glade_xml_get_widget(o->_priv->_glade_xml, "metacity_opacity_vbox");
      o->_priv->configure_xorg_button = (GtkButton * )glade_xml_get_widget(o->_priv->_glade_xml, "configure_xorg_button");
      o->_priv->themes_button = (GtkButton * )glade_xml_get_widget(o->_priv->_glade_xml, "themes_button");
      o->_priv->enable_gl_desktop_checkbutton = (GtkCheckButton * )glade_xml_get_widget(o->_priv->_glade_xml, "enable_gl_desktop_checkbutton");
      o->_priv->use_metacity_theme_checkbutton = (GtkCheckButton * )glade_xml_get_widget(o->_priv->_glade_xml, "use_metacity_theme_checkbutton");
      o->_priv->tray_icon_checkbutton = (GtkCheckButton * )glade_xml_get_widget(o->_priv->_glade_xml, "tray_icon_checkbutton");
      o->_priv->metacity_theme_alignment = (GtkAlignment * )glade_xml_get_widget(o->_priv->_glade_xml, "metacity_theme_alignment");
      o->_priv->metacity_active_window_opacity_hscale = (GtkScale * )glade_xml_get_widget(o->_priv->_glade_xml, "metacity_active_window_opacity_hscale");
      o->_priv->metacity_theme_opacity_hscale = (GtkScale * )glade_xml_get_widget(o->_priv->_glade_xml, "metacity_theme_opacity_hscale");
      o->_priv->metacity_theme_shade_opacity_checkbutton = (GtkCheckButton * )glade_xml_get_widget(o->_priv->_glade_xml, "metacity_theme_shade_opacity_checkbutton");
      o->_priv->active_window_opacity_shade_checkbutton = (GtkCheckButton * )glade_xml_get_widget(o->_priv->_glade_xml, "active_window_opacity_shade_checkbutton");
      o->_priv->window_decorator_frame = (GtkFrame * )glade_xml_get_widget(o->_priv->_glade_xml, "window_decorator_frame");
}
#undef __GOB_FUNCTION__
#line 83 "gcp-page-config.gob"
static void 
gcp_page_config_class_init (GCPPageConfigClass * klass G_GNUC_UNUSED)
#line 376 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::class_init"
      GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) klass;

      g_type_class_add_private(klass,sizeof(GCPPageConfigPrivate));

      parent_class = g_type_class_ref (GTK_TYPE_FRAME);

      object_signals[GL_DESKTOP_CHANGED_SIGNAL] =
            g_signal_new ("gl_desktop_changed",
                  G_TYPE_FROM_CLASS (g_object_class),
                  (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
                  G_STRUCT_OFFSET (GCPPageConfigClass, gl_desktop_changed),
                  NULL, NULL,
                  ___marshal_Sig1,
                  G_TYPE_NONE, 1,
                  G_TYPE_BOOLEAN);
      if ___GOB_UNLIKELY(sizeof(gboolean ) != sizeof(gboolean ) || parent_class == NULL /* avoid warning */) {
            g_error("gcp-page-config.gob line 96: Type mismatch of \"gl_desktop_changed\" signal signature");
      }

      klass->gl_desktop_changed = NULL;
      g_object_class->finalize = ___finalize;
 {
#line 84 "gcp-page-config.gob"

            klass->client = gconf_client_get_default ();
            gconf_client_add_dir (klass->client,
                                            GCP_PREFIX,
                                            GCONF_CLIENT_PRELOAD_NONE,
                                            NULL);
            gconf_client_add_dir (klass->client,
                                            GNOME_WINDOW_DECORATOR_PREFIX,
                                            GCONF_CLIENT_PRELOAD_NONE,
                                            NULL);
      
#line 413 "gcp-page-config.c"
 }
}
#undef __GOB_FUNCTION__



#line 96 "gcp-page-config.gob"
void 
gcp_page_config_gl_desktop_changed (GCPPageConfig * self, gboolean enabled)
#line 423 "gcp-page-config.c"
{
      GValue ___param_values[2];
      GValue ___return_val;

memset (&___return_val, 0, sizeof (___return_val));
memset (&___param_values, 0, sizeof (___param_values));

#line 96 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 96 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 435 "gcp-page-config.c"

      ___param_values[0].g_type = 0;
      g_value_init (&___param_values[0], G_TYPE_FROM_INSTANCE (self));
      g_value_set_instance (&___param_values[0], (gpointer) self);

      ___param_values[1].g_type = 0;
      g_value_init (&___param_values[1], G_TYPE_BOOLEAN);
      g_value_set_boolean (&___param_values[1], (gboolean ) enabled);

      g_signal_emitv (___param_values,
            object_signals[GL_DESKTOP_CHANGED_SIGNAL],
            0 /* detail */,
            &___return_val);

      g_value_unset (&___param_values[0]);
      g_value_unset (&___param_values[1]);
}

#line 99 "gcp-page-config.gob"
GCPPageConfig * 
gcp_page_config_new (GCMGLDesktop * gl_desktop)
#line 457 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::new"
#line 99 "gcp-page-config.gob"
      g_return_val_if_fail (gl_desktop != NULL, (GCPPageConfig * )NULL);
#line 462 "gcp-page-config.c"
{
#line 101 "gcp-page-config.gob"
      
            GCPPageConfig * self = GET_NEW;
            XF86ConfDevicePtr devices, device;
            GSList * item;
            gboolean not_configured = TRUE;
            gboolean have_template = FALSE;
            
            gtk_frame_set_shadow_type(GTK_FRAME(self), GTK_SHADOW_NONE);
            
            /* Create Classic Desktop Launcher */
            selfp->classic_desktop = gcm_classic_desktop_new();
            
        /* Create compiz tray icon */
        selfp->tray_icon = gcm_application_new("compiz-tray-icon", 
                                               NULL, NULL);
            /* Create themes manager */
            selfp->gnome_themes_manager = gcm_application_new("gnome-theme-manager", 
                                                                                      NULL, NULL);
            /* Parse xorg.conf */
            devices = gcm_xorg_config_get_devices(gcm_xorg_get_config(gcm_gl_desktop_get_xorg(gl_desktop)));
            
            for (device = devices; device; device = (XF86ConfDevicePtr)((glp)device)->next)
            {
                  /* Set graphic card name */
                  if (device->dev_identifier)
                        gtk_label_set_text(GTK_LABEL(selfp->label_graphic_card), 
                                                   device->dev_identifier);
                  else
                        gtk_label_set_text(GTK_LABEL(selfp->label_graphic_card), 
                        "Not detected");
            }
            
            /* ref gl desktop */
            selfp->gl_desktop = g_object_ref(gl_desktop);
            
            /* Show configure if all template modified xorg config */
            for (item = gcm_gl_desktop_get_templates(selfp->gl_desktop); item; item = item->next)
            {
                  GCMXorgTemplate * template = GCM_XORG_TEMPLATE(item->data);
            
                  if (template)
                        have_template = TRUE;
                  if (!gcm_xorg_template_get_modified(template))
                  {
                        not_configured = FALSE;
                        break;
                  }
            }
            
#ifdef USE_XORG_CONFIGURATION       
            if (have_template)
                  gtk_widget_show(GTK_WIDGET(selfp->configure_xorg_button));
            else
                  gtk_widget_hide(GTK_WIDGET(selfp->configure_xorg_button));
            
            if (not_configured)
                  gtk_widget_show(GTK_WIDGET(selfp->configure_xorg_warning_hbox));
            else
                  gtk_widget_hide(GTK_WIDGET(selfp->configure_xorg_warning_hbox));
#else
            gtk_widget_hide(GTK_WIDGET(selfp->configure_xorg_button));
            gtk_widget_hide(GTK_WIDGET(selfp->configure_xorg_warning_hbox));
#endif
            
            /* Activate essential plugin */
            gcm_gl_desktop_register_and_enable_plugin(selfp->gl_desktop, "decoration");
            gcm_gl_desktop_register_and_enable_plugin(selfp->gl_desktop, "png");
            gcm_gl_desktop_register_and_enable_plugin(selfp->gl_desktop, "svg");
        
        /* If crashhandler is installed set 2D desktop on crash */
        if (gcm_gl_desktop_register_and_enable_plugin(selfp->gl_desktop, 
                                                      "crashhandler"))
        {
            GCMGLPlugin * crashhandler = gcm_gl_desktop_get_plugin(selfp->gl_desktop,
                                                                   "crashhandler");
            GCMGLOption * enabled = gcm_gl_plugin_get_option(crashhandler, 
                                                             "enabled",
                                                             GCM_GL_OPTION_SCREEN_ALL);
            GCMGLOption * start_window_manager = gcm_gl_plugin_get_option(crashhandler, 
                                                             "start_window_manager",
                                                             GCM_GL_OPTION_SCREEN_ALL);
            GCMGLOption * window_manager_command_line = gcm_gl_plugin_get_option(crashhandler, 
                                                             "window_manager_command_line",
                                                             GCM_GL_OPTION_SCREEN_ALL);
            
            gcm_gl_option_set_boolean(enabled, TRUE);
            gcm_gl_option_set_boolean(start_window_manager, TRUE);
            gcm_gl_option_set_string(window_manager_command_line, WINDOW_MANAGER);
            
            g_object_unref(enabled);
            g_object_unref(start_window_manager);
            g_object_unref(window_manager_command_line);
        }
            
            /* Init options */
            self_init_theme(self);
            self_init_enable_gl_desktop(self);
            self_init_tray_icon(self);
            
            /* Hide metacity opacity for compiz < 0.3.0 */
            if (gcm_gl_desktop_get_version(selfp->gl_desktop) < 3000)
                  gtk_widget_hide(GTK_WIDGET(selfp->metacity_opacity_vbox));
            
            return self;
      }}
#line 570 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 207 "gcp-page-config.gob"
void 
gcp_page_config_on_enable_gl_desktop_checkbutton_toggled (GCPPageConfig * self, GtkWidget * checkbutton)
#line 576 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::on_enable_gl_desktop_checkbutton_toggled"
#line 207 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 207 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 583 "gcp-page-config.c"
{
#line 209 "gcp-page-config.gob"
      
            gboolean val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton));
            
            if (val != gconf_client_get_bool(SELF_GET_CLASS(self)->client, 
                                                             GCP_CONFIG_ENABLE_GL_DESKTOP,
                                                             NULL))
            {
                  gconf_client_set_bool(SELF_GET_CLASS(self)->client, 
                                                  GCP_CONFIG_ENABLE_GL_DESKTOP, val, NULL);
                  gtk_widget_set_sensitive(GTK_WIDGET(selfp->use_metacity_theme_checkbutton), 
                                                       val);
                  val = gconf_client_get_bool(SELF_GET_CLASS(self)->client, 
                                                            GNOME_WINDOW_DECORATOR_USE_METACITY_THEME,
                                                            NULL);
                  gtk_widget_set_sensitive(GTK_WIDGET(selfp->themes_button), val);
            }
      }}
#line 603 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 227 "gcp-page-config.gob"
static void 
gcp_page_config_enable_gl_desktop_changed (GConfClient * client, guint cnxn_id, GConfEntry * entry, GCPPageConfig * self)
#line 609 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::enable_gl_desktop_changed"
{
#line 232 "gcp-page-config.gob"
      
            GConfValue * value = gconf_entry_get_value(entry);
            gboolean enable_gl_desktop = gconf_value_get_bool(value);
            
        if (!gcm_application_get_pid(selfp->tray_icon))
        {
            if (enable_gl_desktop)
            {
                gcm_classic_desktop_stop(selfp->classic_desktop);
                gcm_gl_desktop_start(selfp->gl_desktop);
#ifndef USE_GNOME_SESSION
                gcm_gl_desktop_activate_on_startup(selfp->gl_desktop);
                gcm_gl_desktop_window_decorator_autostart(selfp->gl_desktop, TRUE);
#else
                        self_gl_desktop_autostart(self, TRUE);
#endif
                        if (!self_run_timed_dialog(self))
                        {
                              gconf_client_set_bool(SELF_GET_CLASS(self)->client, 
                                                  GCP_CONFIG_ENABLE_GL_DESKTOP, FALSE, NULL);
                              return;
                        }
            }
                  else
                  {
                gcm_gl_desktop_stop(selfp->gl_desktop);
                gcm_classic_desktop_start(selfp->classic_desktop);
#ifndef USE_GNOME_SESSION
                gcm_gl_desktop_desactivate_on_startup(selfp->gl_desktop);
                gcm_gl_desktop_window_decorator_autostart(selfp->gl_desktop, FALSE);
#else
                        self_gl_desktop_autostart(self, FALSE);
#endif
            }
        }
            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->enable_gl_desktop_checkbutton),
                                                       enable_gl_desktop);
            if (enable_gl_desktop)
                  gtk_widget_show(GTK_WIDGET(selfp->window_decorator_frame));
            else
                  gtk_widget_hide(GTK_WIDGET(selfp->window_decorator_frame));
            self_gl_desktop_changed(self, enable_gl_desktop);
      }}
#line 657 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 276 "gcp-page-config.gob"
static void 
gcp_page_config_init_enable_gl_desktop (GCPPageConfig * self)
#line 663 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::init_enable_gl_desktop"
#line 276 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 276 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 670 "gcp-page-config.c"
{
#line 278 "gcp-page-config.gob"
      
            gboolean val;
            gboolean started;
            
            val = gconf_client_get_bool(SELF_GET_CLASS(self)->client, 
                                                      GCP_CONFIG_ENABLE_GL_DESKTOP,
                                                      NULL);
            started = gcm_gl_desktop_enabled(selfp->gl_desktop);
            if (val != started)
            {
                  val = started;
                  gconf_client_set_bool(SELF_GET_CLASS(self)->client, 
                                                  GCP_CONFIG_ENABLE_GL_DESKTOP, val, NULL);
            }
            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->enable_gl_desktop_checkbutton),
                                                       val);
            gtk_widget_set_sensitive(GTK_WIDGET(selfp->use_metacity_theme_checkbutton), 
                                                 val);
            gconf_client_notify_add(SELF_GET_CLASS(self)->client, 
                                              GCP_CONFIG_ENABLE_GL_DESKTOP, 
                                              (GConfClientNotifyFunc)self_enable_gl_desktop_changed,
                                              self, NULL, NULL);
            if (started)
                  gtk_widget_show(GTK_WIDGET(selfp->window_decorator_frame));
            else
                  gtk_widget_hide(GTK_WIDGET(selfp->window_decorator_frame));
      }}
#line 700 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 306 "gcp-page-config.gob"
void 
gcp_page_config_on_tray_icon_checkbutton_toggled (GCPPageConfig * self, GtkWidget * checkbutton)
#line 706 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::on_tray_icon_checkbutton_toggled"
#line 306 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 306 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 713 "gcp-page-config.c"
{
#line 308 "gcp-page-config.gob"
      
            gboolean tray_icon = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton));
            
            gconf_client_set_bool(SELF_GET_CLASS(self)->client, 
                                            GCP_CONFIG_TRAY_ICON, tray_icon, NULL);
      }}
#line 722 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 315 "gcp-page-config.gob"
static void 
gcp_page_config_tray_icon_changed (GConfClient * client, guint cnxn_id, GConfEntry * entry, GCPPageConfig * self)
#line 728 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::tray_icon_changed"
{
#line 320 "gcp-page-config.gob"
      
            GConfValue * value = gconf_entry_get_value(entry);
            gboolean enable = gconf_value_get_bool(value);
            GCMApplication * tray_icon = gcm_application_new(PACKAGE_BIN_DIR"/compiz-tray-icon",
                                                                                     NULL, NULL);
            
            if (!gcm_application_get_pid(tray_icon))
                  gcm_application_start(tray_icon);
            g_object_unref(tray_icon);
            
            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->tray_icon_checkbutton),
                                                       enable);
      }}
#line 746 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 334 "gcp-page-config.gob"
static void 
gcp_page_config_init_tray_icon (GCPPageConfig * self)
#line 752 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::init_tray_icon"
#line 334 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 334 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 759 "gcp-page-config.c"
{
#line 336 "gcp-page-config.gob"
      
            GCMApplication * tray_icon = gcm_application_new(PACKAGE_BIN_DIR"/compiz-tray-icon",
                                                                                     NULL, NULL);
            gboolean enabled = gcm_application_get_pid(tray_icon);
            
            g_object_unref(tray_icon);
            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->tray_icon_checkbutton),
                                                       enabled);
            gconf_client_notify_add(SELF_GET_CLASS(self)->client, GCP_CONFIG_TRAY_ICON, 
                                                (GConfClientNotifyFunc)self_tray_icon_changed,
                                                self, NULL, NULL);
      }}
#line 774 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 349 "gcp-page-config.gob"
void 
gcp_page_config_on_use_metacity_theme_checkbutton_toggled (GCPPageConfig * self, GtkWidget * checkbutton)
#line 780 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::on_use_metacity_theme_checkbutton_toggled"
#line 349 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 349 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 787 "gcp-page-config.c"
{
#line 351 "gcp-page-config.gob"
      
            gboolean val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton));

            if (val != gconf_client_get_bool(SELF_GET_CLASS(self)->client,
                                                             GNOME_WINDOW_DECORATOR_USE_METACITY_THEME,
                                                             NULL))
                  gconf_client_set_bool(SELF_GET_CLASS(self)->client,
                                                  GNOME_WINDOW_DECORATOR_USE_METACITY_THEME, 
                                                  val, NULL);
      }}
#line 800 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 362 "gcp-page-config.gob"
static void 
gcp_page_config_use_metacity_theme_changed (GConfClient * client, guint cnxn_id, GConfEntry * entry, GCPPageConfig * self)
#line 806 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::use_metacity_theme_changed"
{
#line 367 "gcp-page-config.gob"
      
            GConfValue * value = gconf_entry_get_value(entry);
            gboolean use_metacity_theme = gconf_value_get_bool(value);
            
            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->use_metacity_theme_checkbutton),
                                                       use_metacity_theme);
            gtk_widget_set_sensitive(GTK_WIDGET(selfp->metacity_theme_alignment), 
                                                 use_metacity_theme);
      }}
#line 820 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 377 "gcp-page-config.gob"
void 
gcp_page_config_on_metacity_theme_opacity_hscale_value_changed (GCPPageConfig * self, GtkRange * range)
#line 826 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::on_metacity_theme_opacity_hscale_value_changed"
#line 377 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 377 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 833 "gcp-page-config.c"
{
#line 379 "gcp-page-config.gob"
      
            gdouble value = gtk_range_get_value(GTK_RANGE(selfp->metacity_theme_opacity_hscale));
            
            gconf_client_set_float(SELF_GET_CLASS(self)->client, 
                                             GNOME_WINDOW_DECORATOR_METACITY_THEME_OPACITY, 
                                             (gdouble)value / 100.0, NULL);
      }}
#line 843 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 387 "gcp-page-config.gob"
void 
gcp_page_config_on_metacity_active_window_opacity_hscale_value_changed (GCPPageConfig * self, GtkRange * range)
#line 849 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::on_metacity_active_window_opacity_hscale_value_changed"
#line 387 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 387 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 856 "gcp-page-config.c"
{
#line 389 "gcp-page-config.gob"
      
            gdouble value = gtk_range_get_value(GTK_RANGE(selfp->metacity_active_window_opacity_hscale));
            
            gconf_client_set_float(SELF_GET_CLASS(self)->client, 
                                             GNOME_WINDOW_DECORATOR_METACITY_THEME_ACTIVE_OPACITY,
                                             (gdouble)value / 100.0, NULL);
      }}
#line 866 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 397 "gcp-page-config.gob"
void 
gcp_page_config_on_metacity_theme_shade_opacity_checkbutton_toggled (GCPPageConfig * self, GtkButton * button)
#line 872 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::on_metacity_theme_shade_opacity_checkbutton_toggled"
#line 397 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 397 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 879 "gcp-page-config.c"
{
#line 399 "gcp-page-config.gob"
      
            gboolean val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->metacity_theme_shade_opacity_checkbutton));
            
            gconf_client_set_bool(SELF_GET_CLASS(self)->client, 
                                            GNOME_WINDOW_DECORATOR_METACITY_THEME_SHADE_OPACITY,
                                            val, NULL);
      }}
#line 889 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 407 "gcp-page-config.gob"
void 
gcp_page_config_on_active_window_spacity_shade_checkbutton_toggled (GCPPageConfig * self, GtkButton * button)
#line 895 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::on_active_window_spacity_shade_checkbutton_toggled"
#line 407 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 407 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 902 "gcp-page-config.c"
{
#line 409 "gcp-page-config.gob"
      
            gboolean val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(selfp->active_window_opacity_shade_checkbutton));
            
            gconf_client_set_bool(SELF_GET_CLASS(self)->client, 
                                            GNOME_WINDOW_DECORATOR_METACITY_THEME_ACTIVE_SHADE_OPACITY,
                                            val, NULL);
      }}
#line 912 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 417 "gcp-page-config.gob"
static void 
gcp_page_config_init_theme (GCPPageConfig * self)
#line 918 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::init_theme"
#line 417 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 417 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 925 "gcp-page-config.c"
{
#line 419 "gcp-page-config.gob"
      
            gboolean val;
            gdouble theme_opacity = gconf_client_get_float(SELF_GET_CLASS(self)->client, 
                                                                                 GNOME_WINDOW_DECORATOR_METACITY_THEME_OPACITY,
                                                                                 NULL);
            gdouble active_theme_opacity = gconf_client_get_float(SELF_GET_CLASS(self)->client, 
                                                                                            GNOME_WINDOW_DECORATOR_METACITY_THEME_ACTIVE_OPACITY,
                                                                                            NULL);
            GtkTooltips * tooltips;
            
            val = gconf_client_get_bool(SELF_GET_CLASS(self)->client, 
                                                      GNOME_WINDOW_DECORATOR_USE_METACITY_THEME,
                                                      NULL);
            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->use_metacity_theme_checkbutton),
                                                     val);
            gtk_widget_set_sensitive(GTK_WIDGET(selfp->themes_button), val);
            gconf_client_notify_add(SELF_GET_CLASS(self)->client, 
                                              GNOME_WINDOW_DECORATOR_USE_METACITY_THEME, 
                                                (GConfClientNotifyFunc)self_use_metacity_theme_changed,
                                                self, NULL, NULL);
            
            val = gconf_client_get_bool(SELF_GET_CLASS(self)->client, 
                                                      GNOME_WINDOW_DECORATOR_METACITY_THEME_ACTIVE_SHADE_OPACITY,
                                                      NULL);
            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->active_window_opacity_shade_checkbutton),
                                                     val);
            
            val = gconf_client_get_bool(SELF_GET_CLASS(self)->client, 
                                                      GNOME_WINDOW_DECORATOR_METACITY_THEME_SHADE_OPACITY,
                                                      NULL);
            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(selfp->metacity_theme_shade_opacity_checkbutton),
                                                     val);
            
            gtk_range_set_value(GTK_RANGE(selfp->metacity_theme_opacity_hscale), 
                                          theme_opacity * 100.0);
            gtk_range_set_value(GTK_RANGE(selfp->metacity_active_window_opacity_hscale), 
                                          active_theme_opacity * 100.0);
            
            tooltips = gtk_tooltips_new();
            
            gtk_tooltips_set_tip(tooltips, GTK_WIDGET(selfp->use_metacity_theme_checkbutton),
                                           self_get_gconf_description(self, GNOME_WINDOW_DECORATOR_USE_METACITY_THEME),
                                           NULL);
            gtk_tooltips_set_tip(tooltips, GTK_WIDGET(selfp->active_window_opacity_shade_checkbutton),
                                           self_get_gconf_description(self, GNOME_WINDOW_DECORATOR_METACITY_THEME_ACTIVE_SHADE_OPACITY),
                                           NULL);
            gtk_tooltips_set_tip(tooltips, GTK_WIDGET(selfp->metacity_theme_shade_opacity_checkbutton),
                                           self_get_gconf_description(self, GNOME_WINDOW_DECORATOR_METACITY_THEME_SHADE_OPACITY),
                                           NULL);
            gtk_tooltips_set_tip(tooltips, GTK_WIDGET(selfp->metacity_theme_opacity_hscale),
                                           self_get_gconf_description(self, GNOME_WINDOW_DECORATOR_METACITY_THEME_OPACITY),
                                           NULL);
            gtk_tooltips_set_tip(tooltips, GTK_WIDGET(selfp->metacity_active_window_opacity_hscale),
                                           self_get_gconf_description(self, GNOME_WINDOW_DECORATOR_METACITY_THEME_ACTIVE_OPACITY),
                                           NULL);
      }}
#line 984 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 476 "gcp-page-config.gob"
void 
gcp_page_config_on_themes_button_clicked (GCPPageConfig * self)
#line 990 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::on_themes_button_clicked"
#line 476 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 476 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 997 "gcp-page-config.c"
{
#line 478 "gcp-page-config.gob"
      
            gcm_application_start(selfp->gnome_themes_manager);
      }}
#line 1003 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 482 "gcp-page-config.gob"
void 
gcp_page_config_on_configure_xorg_button_clicked (GCPPageConfig * self, GtkButton * button)
#line 1009 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::on_configure_xorg_button_clicked"
#line 482 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 482 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 1016 "gcp-page-config.c"
{
#line 484 "gcp-page-config.gob"
      
            GSList * templates  = gcm_gl_desktop_get_templates(selfp->gl_desktop);
            gint nb = 0;
            
            if (templates && (nb = g_slist_length(templates)) > 0)
            {
                  GList * argv = NULL;
                  GCMXorg * xorg;
                  GCMXorgTemplate * template;
                  GCMApplication * gksu;
                  
                  /*if (nb == 1)*/
                        template = GCM_XORG_TEMPLATE(templates->data);
                  
                  xorg = gcm_xorg_new();
                  argv = g_list_append(argv,
                                                  g_strdup_printf(PACKAGE_SBIN_DIR"/gcm-config-xorg %s --template %s",
                                                  !gcm_xorg_is_xgl(xorg) ? "--aiglx" : "--xgl",
                                                  gcm_xorg_template_get_filename(template)));
                              gksu = gcm_application_new("gksudo", NULL, argv);
                  gcm_application_start(gksu);
                  g_object_unref(gksu);
            }
      }}
#line 1043 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 509 "gcp-page-config.gob"
static void 
gcp_page_config_gl_desktop_autostart (GCPPageConfig * self, gboolean enable)
#line 1049 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::gl_desktop_autostart"
#line 509 "gcp-page-config.gob"
      g_return_if_fail (self != NULL);
#line 509 "gcp-page-config.gob"
      g_return_if_fail (GCP_IS_PAGE_CONFIG (self));
#line 1056 "gcp-page-config.c"
{
#line 511 "gcp-page-config.gob"
      
            gchar *gl_manager = gcm_gl_desktop_get_gl_manager(selfp->gl_desktop);
            
            gconf_client_set_string(SELF_GET_CLASS(self)->client, 
                                              "/desktop/gnome/applications/window_manager/default",
                                              enable ? gl_manager : "", NULL);
      }}
#line 1066 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 519 "gcp-page-config.gob"
static gchar * 
gcp_page_config_get_gconf_description (GCPPageConfig * self, gchar * key)
#line 1072 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::get_gconf_description"
#line 519 "gcp-page-config.gob"
      g_return_val_if_fail (self != NULL, (gchar * )NULL);
#line 519 "gcp-page-config.gob"
      g_return_val_if_fail (GCP_IS_PAGE_CONFIG (self), (gchar * )NULL);
#line 519 "gcp-page-config.gob"
      g_return_val_if_fail (key != NULL, (gchar * )NULL);
#line 1081 "gcp-page-config.c"
{
#line 521 "gcp-page-config.gob"
      
            GConfEntry *entry;
      GConfSchema *schema = NULL;
            gchar * desc = NULL;
            
            if ((entry = gconf_client_get_entry(SELF_GET_CLASS(self)->client,
                                                                  key, NULL, TRUE, NULL))== NULL)
                  return NULL;
            
            if (gconf_entry_get_schema_name(entry))
                  schema = gconf_client_get_schema(SELF_GET_CLASS(self)->client,
                                                                   gconf_entry_get_schema_name (entry), 
                                                                   NULL);
            if (!schema) return NULL;
            desc = g_strdup(gconf_schema_get_long_desc(schema));
            gconf_entry_free(entry);
            gconf_schema_free(schema);
            return desc;
      }}
#line 1103 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 546 "gcp-page-config.gob"
static gboolean 
gcp_page_config_free_at_idle (gpointer data)
#line 1109 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::free_at_idle"
{
#line 548 "gcp-page-config.gob"
      
      g_free (data);
      return FALSE;
      }}
#line 1118 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 553 "gcp-page-config.gob"
static char * 
gcp_page_config_idle_free (char * str)
#line 1124 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::idle_free"
{
#line 555 "gcp-page-config.gob"
      
      g_idle_add (self_free_at_idle, str);
      return str;
      }}
#line 1133 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 560 "gcp-page-config.gob"
static char * 
gcp_page_config_timeout_string (int time)
#line 1139 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::timeout_string"
{
#line 562 "gcp-page-config.gob"
      
      char *str = g_strdup_printf (ngettext ("Testing the new settings. If you don't respond in %d second the previous settings will be restored.", "Testing the new settings. If you don't respond in %d seconds the previous settings will be restored.", time), time);
    
          return self_idle_free (str);
      }}
#line 1149 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 568 "gcp-page-config.gob"
static gboolean 
gcp_page_config_save_timeout_callback (gpointer _data)
#line 1155 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::save_timeout_callback"
{
#line 570 "gcp-page-config.gob"
      
      struct TimeoutData *data = _data;
    
      data->time--;
    
      if (data->time == 0)
      {
                  gtk_dialog_response (data->dialog, GTK_RESPONSE_NO);
                  data->timed_out = TRUE;
                  return FALSE;
      }
    
          gtk_label_set_text (data->label, self_timeout_string (data->time));
          
      return TRUE;
      }}
#line 1176 "gcp-page-config.c"
#undef __GOB_FUNCTION__

#line 587 "gcp-page-config.gob"
static gboolean 
gcp_page_config_run_timed_dialog (GCPPageConfig * self)
#line 1182 "gcp-page-config.c"
{
#define __GOB_FUNCTION__ "GCP:Page:Config::run_timed_dialog"
#line 587 "gcp-page-config.gob"
      g_return_val_if_fail (self != NULL, (gboolean )FALSE);
#line 587 "gcp-page-config.gob"
      g_return_val_if_fail (GCP_IS_PAGE_CONFIG (self), (gboolean )FALSE);
#line 1189 "gcp-page-config.c"
{
#line 589 "gcp-page-config.gob"
      
      GtkWidget *dialog;
      GtkWidget *hbox;
      GtkWidget *vbox;
      GtkWidget *label;
      GtkWidget *label_sec;
      GtkWidget *image;
      int res;
      struct TimeoutData timeout_data;
      guint timeout;
    
      dialog = gtk_dialog_new ();
      gtk_window_set_transient_for (
                                          GTK_WINDOW (dialog), 
                                          GTK_WINDOW (gtk_widget_get_toplevel(GTK_WIDGET(self))));
      gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
      gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
      gtk_container_set_border_width (GTK_CONTAINER (dialog), 12);
      gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
      gtk_window_set_title (GTK_WINDOW (dialog), _("Keep Settings"));
      gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER_ALWAYS);
    
      label = gtk_label_new (NULL);
      gtk_label_set_markup (GTK_LABEL (label), self_idle_free (
                              g_strdup_printf ("<b>%s</b>",
                                           _("Do you want to keep these settings?"))));
      image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG);
      gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
    
          gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
          gtk_label_set_selectable (GTK_LABEL (label), TRUE);
          gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
    
          label_sec = gtk_label_new (self_timeout_string (REVERT_COUNT));
          gtk_label_set_line_wrap (GTK_LABEL (label_sec), TRUE);
          gtk_label_set_selectable (GTK_LABEL (label_sec), TRUE);
          gtk_misc_set_alignment (GTK_MISC (label_sec), 0.0, 0.5);
    
          hbox = gtk_hbox_new (FALSE, 6);
          vbox = gtk_vbox_new (FALSE, 6);
    
          gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
          gtk_box_pack_start (GTK_BOX (vbox), label_sec, TRUE, TRUE, 0);
          gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
          gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
          gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0);
          gtk_dialog_add_buttons (GTK_DIALOG (dialog),
                            _("Use _previous settings"), GTK_RESPONSE_NO,
                        _("_Keep settings"), GTK_RESPONSE_YES, NULL);
    
          gtk_widget_show_all (hbox);
    
          timeout_data.time = REVERT_COUNT;
          timeout_data.label = GTK_LABEL (label_sec);
          timeout_data.dialog = GTK_DIALOG (dialog);
          timeout_data.timed_out = FALSE;
    
          timeout = g_timeout_add (1000, self_save_timeout_callback, &timeout_data);
          res = gtk_dialog_run (GTK_DIALOG (dialog));
    
          if (!timeout_data.timed_out)
                  g_source_remove (timeout);
    
      gtk_widget_destroy (dialog);
    
          return (res == GTK_RESPONSE_YES);
      }}
#line 1259 "gcp-page-config.c"
#undef __GOB_FUNCTION__

Generated by  Doxygen 1.6.0   Back to index