[glide] Start adding a GlideSlideButton class
- From: Robert Carr <racarr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glide] Start adding a GlideSlideButton class
- Date: Thu, 29 Apr 2010 08:41:01 +0000 (UTC)
commit 9afa2eac22339b2930ffba2e4a861e5c50e01623
Author: Robert Carr <racarr Valentine localdomain>
Date: Thu Apr 29 01:51:25 2010 -0400
Start adding a GlideSlideButton class
data/ui/glide-window.ui | 42 ++++++++++++++++++++++++++++--
src/Makefile.am | 2 +
src/glide-slide-button-priv.h | 34 ++++++++++++++++++++++++
src/glide-slide-button.c | 52 +++++++++++++++++++++++++++++++++++++
src/glide-slide-button.h | 57 +++++++++++++++++++++++++++++++++++++++++
src/glide-window.c | 4 +++
6 files changed, 188 insertions(+), 3 deletions(-)
---
diff --git a/data/ui/glide-window.ui b/data/ui/glide-window.ui
index 126e320..19a2846 100644
--- a/data/ui/glide-window.ui
+++ b/data/ui/glide-window.ui
@@ -73,6 +73,7 @@
<property name="visible">True</property>
<property name="related_action">png-export-action</property>
<property name="use_action_appearance">True</property>
+ <property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
</child>
@@ -504,10 +505,45 @@
</packing>
</child>
<child>
- <object class="GtkFixed" id="embed-fixed">
- <property name="width_request">800</property>
- <property name="height_request">600</property>
+ <object class="GtkHBox" id="middle-hbox">
<property name="visible">True</property>
+ <child>
+ <object class="GtkScrolledWindow" id="slide-pane-scrolled">
+ <property name="width_request">80</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <object class="GtkViewport" id="slide-pane-viewport">
+ <property name="visible">True</property>
+ <property name="resize_mode">queue</property>
+ <child>
+ <object class="GtkVBox" id="slide-pane-vbox">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFixed" id="embed-fixed">
+ <property name="width_request">800</property>
+ <property name="height_request">600</property>
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="position">2</property>
diff --git a/src/Makefile.am b/src/Makefile.am
index b835f12..d2b4365 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -71,6 +71,8 @@ glide_SOURCES = \
glide-cairo-util.h \
glide-animation-manager.c \
glide-animation-manager.h \
+ glide-slide-button.c \
+ glide-slide-button.h \
$(glide_VALABUILTSOURCES)
diff --git a/src/glide-slide-button-priv.h b/src/glide-slide-button-priv.h
new file mode 100644
index 0000000..330ea14
--- /dev/null
+++ b/src/glide-slide-button-priv.h
@@ -0,0 +1,34 @@
+/*
+ * glide-slide-button-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_SLIDE_BUTTON_PRIVATE_H__
+#define __GLIDE_SLIDE_BUTTON_PRIVATE_H__
+
+#include "glide-slide-button.h"
+
+G_BEGIN_DECLS
+
+struct _GlideSlideButtonPrivate
+{
+ gpointer fill;
+};
+
+G_END_DECLS
+
+#endif
diff --git a/src/glide-slide-button.c b/src/glide-slide-button.c
new file mode 100644
index 0000000..db9309a
--- /dev/null
+++ b/src/glide-slide-button.c
@@ -0,0 +1,52 @@
+/*
+ * glide-slide-button.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/>.
+ */
+
+#include "glide-slide-button.h"
+#include "glide-slide-button-priv.h"
+
+#define GLIDE_SLIDE_BUTTON_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), GLIDE_TYPE_SLIDE_BUTTON, GlideSlideButtonPrivate))
+
+G_DEFINE_TYPE(GlideSlideButton, glide_slide_button, GTK_TYPE_BUTTON);
+
+static void
+glide_slide_button_finalize (GObject *object)
+{
+
+}
+
+static void
+glide_slide_button_init (GlideSlideButton *button)
+{
+ button->priv = GLIDE_SLIDE_BUTTON_GET_PRIVATE (button);
+}
+
+static void
+glide_slide_button_class_init (GlideSlideButtonClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = glide_slide_button_finalize;
+ g_type_class_add_private (object_class, sizeof(GlideSlideButtonPrivate));
+}
+
+GtkWidget *
+glide_slide_button_new ()
+{
+ return (GtkWidget *)g_object_new (GLIDE_TYPE_SLIDE_BUTTON, NULL);
+}
+
diff --git a/src/glide-slide-button.h b/src/glide-slide-button.h
new file mode 100644
index 0000000..93786fe
--- /dev/null
+++ b/src/glide-slide-button.h
@@ -0,0 +1,57 @@
+/*
+ * glide-slide-button.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_SLIDE_BUTTON_H__
+#define __GLIDE_SLIDE_BUTTON_H__
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define GLIDE_TYPE_SLIDE_BUTTON (glide_slide_button_get_type())
+#define GLIDE_SLIDE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GLIDE_TYPE_SLIDE_BUTTON, GlideSlideButton))
+#define GLIDE_SLIDE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GLIDE_TYPE_SLIDE_BUTTON, GlideSlideButtonClass))
+#define GLIDE_IS_SLIDE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GLIDE_TYPE_SLIDE_BUTTON))
+#define GLIDE_IS_SLIDE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLIDE_TYPE_SLIDE_BUTTON))
+#define GLIDE_SLIDE_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GLIDE_TYPE_SLIDE_BUTTON, GlideSlideButtonClass))
+
+typedef struct _GlideSlideButtonPrivate GlideSlideButtonPrivate;
+
+
+typedef struct _GlideSlideButton GlideSlideButton;
+
+struct _GlideSlideButton
+{
+ GtkButton button;
+
+ GlideSlideButtonPrivate *priv;
+};
+
+typedef struct _GlideSlideButtonClass GlideSlideButtonClass;
+
+struct _GlideSlideButtonClass
+{
+ GtkButtonClass parent_class;
+};
+
+GType glide_slide_button_get_type (void) G_GNUC_CONST;
+GtkWidget *glide_slide_button_new (void);
+
+G_END_DECLS
+
+#endif
diff --git a/src/glide-window.c b/src/glide-window.c
index 8c99185..60bcf20 100644
--- a/src/glide-window.c
+++ b/src/glide-window.c
@@ -641,6 +641,9 @@ glide_window_insert_stage (GlideWindow *w)
gdk_color_parse ("black", &black);
gtk_widget_modify_bg (fixed, GTK_STATE_NORMAL, &black);
+ gdk_color_parse ("white", &black);
+ gtk_widget_modify_bg (GTK_WIDGET (GLIDE_WINDOW_UI_OBJECT (w, "slide-pane-viewport")), GTK_STATE_NORMAL, &black);
+
w->priv->embed = embed;
w->priv->stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (embed));
@@ -1136,6 +1139,7 @@ glide_window_fullscreen_stage (GlideWindow *w)
gtk_widget_show (GTK_WIDGET (w));
gtk_widget_show_all (fixed);
gtk_widget_show (gtk_widget_get_parent (fixed));
+ gtk_widget_show (gtk_widget_get_parent (gtk_widget_get_parent (fixed)));
glide_document_get_size (w->priv->document, &w->priv->old_document_width, &w->priv->old_document_height);
glide_document_resize (w->priv->document, gdk_screen_get_height (screen) * 1.3333,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]