[glide] Begin adding theme-chooser



commit e01c8c52d6ac077b6840935c933035ce9d1ab564
Author: Robert Carr <racarr Valentine localdomain>
Date:   Tue May 25 14:27:02 2010 -0400

    Begin adding theme-chooser

 libglide/Makefile.am                |    2 +
 libglide/glide-theme-chooser-priv.h |   34 ++++++++++++
 libglide/glide-theme-chooser.c      |   95 +++++++++++++++++++++++++++++++++++
 libglide/glide-theme-chooser.h      |   58 +++++++++++++++++++++
 4 files changed, 189 insertions(+), 0 deletions(-)
---
diff --git a/libglide/Makefile.am b/libglide/Makefile.am
index 41ac5cf..0dc16dd 100644
--- a/libglide/Makefile.am
+++ b/libglide/Makefile.am
@@ -62,6 +62,7 @@ glideheaders_HEADERS = \
 	glide-binding.h \
 	glide-print-util.h \
 	glide-theme-manager.h \
+	glide-theme-chooser.h \
 	$(glide_VALABUILTHEADERS)
 
 glideheadersdir = $(pkgincludedir)
@@ -100,6 +101,7 @@ libglide_la_SOURCES = \
 	glide-binding.c \
 	glide-print-util.c \
 	glide-theme-manager.c \
+	glide-theme-chooser.c \
 	$(glide_VALABUILTSOURCES)
 
 libglide_la_CFLAGS = \
diff --git a/libglide/glide-theme-chooser-priv.h b/libglide/glide-theme-chooser-priv.h
new file mode 100644
index 0000000..e556bd9
--- /dev/null
+++ b/libglide/glide-theme-chooser-priv.h
@@ -0,0 +1,34 @@
+/*
+ * glide-theme-chooser-priv.h
+ * Copyright (C) Robert Carr 2010 <racarr gnome org>
+ * 
+ * Glide 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 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * Glide 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, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#ifndef __GLIDE_THEME_CHOOSER_PRIVATE_H__
+#define __GLIDE_THEME_CHOOSER_PRIVATE_H__
+
+#include "glide-theme-chooser.h"
+
+G_BEGIN_DECLS
+
+struct _GlideThemeChooserPrivate
+{
+  gpointer filler;
+};
+
+G_END_DECLS
+
+#endif
diff --git a/libglide/glide-theme-chooser.c b/libglide/glide-theme-chooser.c
new file mode 100644
index 0000000..6d67af7
--- /dev/null
+++ b/libglide/glide-theme-chooser.c
@@ -0,0 +1,95 @@
+/*
+ * glide-theme-chooser.c
+ * Copyright (C) Robert Carr 2010 <racarr gnome org>
+ * 
+ * Glide 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 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * Glide 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, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * SECTION:glide-theme-chooser
+ * @short_description: A toplevel window for selecting
+ * themes.
+ *
+ */
+
+#include "glide-theme-chooser.h"
+#include "glide-theme-chooser-priv.h"
+
+#define GLIDE_THEME_CHOOSER_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), GLIDE_TYPE_THEME_CHOOSER, GlideThemeChooserPrivate))
+
+G_DEFINE_TYPE(GlideThemeChooser, glide_theme_chooser, GTK_TYPE_WINDOW);
+
+enum {
+  PROP_0,
+};
+
+static void
+glide_theme_chooser_finalize (GObject *object)
+{
+  
+}
+
+static void
+glide_theme_chooser_get_property (GObject *object,
+			      guint prop_id,
+			      GValue *value,
+			      GParamSpec *pspec)
+{
+  switch (prop_id)
+    {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+glide_theme_chooser_set_property (GObject *object,
+			      guint prop_id,
+			      const GValue *value,
+			      GParamSpec *pspec)
+{
+  switch (prop_id)
+    {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+glide_theme_chooser_init (GlideThemeChooser *chooser)
+{
+  chooser->priv = GLIDE_THEME_CHOOSER_GET_PRIVATE (chooser);
+}
+
+static void
+glide_theme_chooser_class_init (GlideThemeChooserClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = glide_theme_chooser_finalize;
+  object_class->get_property = glide_theme_chooser_get_property;
+  object_class->set_property = glide_theme_chooser_set_property;
+  
+  g_type_class_add_private (object_class, sizeof(GlideThemeChooserPrivate));
+}
+
+GtkWidget *
+glide_theme_chooser_new ()
+{
+  return (GtkWidget *)g_object_new (GLIDE_TYPE_THEME_CHOOSER, NULL);
+}
+
+
diff --git a/libglide/glide-theme-chooser.h b/libglide/glide-theme-chooser.h
new file mode 100644
index 0000000..4473e0a
--- /dev/null
+++ b/libglide/glide-theme-chooser.h
@@ -0,0 +1,58 @@
+/*
+ * glide-theme-chooser.h
+ * Copyright (C) Robert Carr 2010 <racarr gnome org>
+ * 
+ * Glide 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 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * Glide 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GLIDE_THEME_CHOOSER_H__
+#define __GLIDE_THEME_CHOOSER_H__
+
+#include <gtk/gtk.h>
+#include "glide-theme.h"
+
+G_BEGIN_DECLS
+
+#define GLIDE_TYPE_THEME_CHOOSER              (glide_theme_chooser_get_type())
+#define GLIDE_THEME_CHOOSER(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj), GLIDE_TYPE_THEME_CHOOSER, GlideThemeChooser))
+#define GLIDE_THEME_CHOOSER_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), GLIDE_TYPE_THEME_CHOOSER, GlideThemeChooserClass))
+#define GLIDE_IS_THEME_CHOOSER(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj), GLIDE_TYPE_THEME_CHOOSER))
+#define GLIDE_IS_THEME_CHOOSER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GLIDE_TYPE_THEME_CHOOSER))
+#define GLIDE_THEME_CHOOSER_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GLIDE_TYPE_THEME_CHOOSER, GlideThemeChooserClass))
+
+typedef struct _GlideThemeChooserPrivate GlideThemeChooserPrivate;
+
+
+typedef struct _GlideThemeChooser GlideThemeChooser;
+
+struct _GlideThemeChooser
+{
+  GtkWindow window;
+  
+  GlideThemeChooserPrivate *priv;
+};
+
+typedef struct _GlideThemeChooserClass GlideThemeChooserClass;
+
+struct _GlideThemeChooserClass
+{
+  GtkWindowClass parent_class;
+};
+
+GType glide_theme_chooser_get_type (void) G_GNUC_CONST;
+GtkWidget *glide_theme_chooser_new (void);
+
+G_END_DECLS
+
+#endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]