[glide] Begin to implement some machinery for getting a response out of theme chooser
- From: Robert Carr <racarr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glide] Begin to implement some machinery for getting a response out of theme chooser
- Date: Sat, 5 Jun 2010 19:50:25 +0000 (UTC)
commit 315bda9a7a7039cb9286c31ef0cca38686d31237
Author: Robert Carr <racarr Valentine localdomain>
Date: Tue May 25 15:45:21 2010 -0400
Begin to implement some machinery for getting a response out of theme chooser
libglide/glide-theme-chooser.c | 54 +++++++++++++++++++++++++++++++++++++--
1 files changed, 51 insertions(+), 3 deletions(-)
---
diff --git a/libglide/glide-theme-chooser.c b/libglide/glide-theme-chooser.c
index 5faf3cc..1ecb4b6 100644
--- a/libglide/glide-theme-chooser.c
+++ b/libglide/glide-theme-chooser.c
@@ -31,6 +31,8 @@
#include "glide-debug.h"
+#include <girepository.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);
@@ -39,6 +41,13 @@ enum {
PROP_0,
};
+enum {
+ RESPONSE,
+ LAST_SIGNAL
+};
+
+static guint theme_chooser_signals[LAST_SIGNAL] = { 0, };
+
static void
glide_theme_chooser_finalize (GObject *object)
{
@@ -144,7 +153,7 @@ glide_theme_chooser_make_treeview (GlideThemeChooser *chooser)
}
static GtkWidget *
-glide_theme_chooser_make_main_hbox (GlideThemeChooser *chooser)
+glide_theme_chooser_make_top_hbox (GlideThemeChooser *chooser)
{
GtkWidget *ret = gtk_hbox_new (FALSE, 0);
GtkWidget *tree_view, *preview;
@@ -162,12 +171,42 @@ glide_theme_chooser_make_main_hbox (GlideThemeChooser *chooser)
return ret;
}
+static GtkWidget *
+glide_theme_chooser_make_bottom_hbox (GlideThemeChooser *chooser)
+{
+ GtkWidget *ret = gtk_hbox_new (FALSE, 0);
+ GtkWidget *new, *cancel;
+
+ new = gtk_button_new_with_label ("New");
+ cancel = gtk_button_new_with_label ("Cancel");
+
+ gtk_box_pack_start (GTK_BOX (ret), cancel, FALSE, 0, 0);
+ gtk_box_pack_start (GTK_BOX (ret), new, FALSE, 0, 0);
+
+ return ret;
+}
+
+static GtkWidget *
+glide_theme_chooser_make_main_vbox (GlideThemeChooser *chooser)
+{
+ GtkWidget *ret = gtk_vbox_new (FALSE, 0);
+ GtkWidget *top, *bottom;
+
+ top = glide_theme_chooser_make_top_hbox (chooser);
+ bottom = glide_theme_chooser_make_bottom_hbox (chooser);
+
+ gtk_box_pack_start (GTK_BOX (ret), top, FALSE, 0, 0);
+ gtk_box_pack_start (GTK_BOX (ret), bottom, FALSE, 0, 0);
+
+ return ret;
+}
+
static void
glide_theme_chooser_setup_ui (GlideThemeChooser *chooser)
{
- GtkWidget *hbox = glide_theme_chooser_make_main_hbox (chooser);
+ GtkWidget *vbox = glide_theme_chooser_make_main_vbox (chooser);
- gtk_container_add (GTK_CONTAINER (chooser), hbox);
+ gtk_container_add (GTK_CONTAINER (chooser), vbox);
}
static void
@@ -192,6 +231,15 @@ glide_theme_chooser_class_init (GlideThemeChooserClass *klass)
object_class->get_property = glide_theme_chooser_get_property;
object_class->set_property = glide_theme_chooser_set_property;
+ theme_chooser_signals[RESPONSE] =
+ g_signal_new ("response",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL, NULL,
+ gi_cclosure_marshal_generic,
+ G_TYPE_NONE, 0);
+
g_type_class_add_private (object_class, sizeof(GlideThemeChooserPrivate));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]