[glade/wip/beniofel/popover: 1/19] Add support for GtkPopover



commit 507deda94d5b7cc0924dba331cd7b793a1ffa898
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Nov 13 23:41:53 2014 -0500

    Add support for GtkPopover
    
    This is pretty bare-bones at the moment.

 plugins/gtk+/Makefile.am                        |    1 +
 plugins/gtk+/glade-gtk-popover.c                |   45 +++++++++++++++++++++++
 plugins/gtk+/gtk+.xml.in                        |    9 +++++
 plugins/gtk+/icons/16x16/Makefile.am            |    1 +
 plugins/gtk+/icons/16x16/widget-gtk-popover.png |  Bin 0 -> 276 bytes
 plugins/gtk+/icons/22x22/Makefile.am            |    1 +
 plugins/gtk+/icons/22x22/widget-gtk-popover.png |  Bin 0 -> 327 bytes
 7 files changed, 57 insertions(+), 0 deletions(-)
---
diff --git a/plugins/gtk+/Makefile.am b/plugins/gtk+/Makefile.am
index 4fff22b..8e15d89 100644
--- a/plugins/gtk+/Makefile.am
+++ b/plugins/gtk+/Makefile.am
@@ -91,6 +91,7 @@ libgladegtk_la_SOURCES =              \
        glade-gtk-notebook.c            \
        glade-gtk-overlay.c             \
        glade-gtk-paned.c               \
+       glade-gtk-popover.c             \
        glade-gtk-progress-bar.c        \
        glade-gtk-radio-button.c        \
        glade-gtk-radio-menu-item.c     \
diff --git a/plugins/gtk+/glade-gtk-popover.c b/plugins/gtk+/glade-gtk-popover.c
new file mode 100644
index 0000000..2d80bad
--- /dev/null
+++ b/plugins/gtk+/glade-gtk-popover.c
@@ -0,0 +1,45 @@
+/*
+ * glade-gtk-popover.c - GladeWidgetAdaptor for GtkPopover
+ *
+ * Copyright (C) 2014 Red Hat, Inc
+ *
+ * Authors:
+ *      Matthias Clasen <mclasen redhat com>
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public 
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <glib/gi18n-lib.h>
+#include <gladeui/glade.h>
+
+GObject *
+glade_gtk_popover_constructor (GType type,
+                               guint n_construct_properties,
+                               GObjectConstructParam * construct_properties)
+{
+  GladeWidgetAdaptor *adaptor;
+  GObject *ret_obj;
+
+  ret_obj = GWA_GET_OCLASS (GTK_TYPE_CONTAINER)->constructor
+      (type, n_construct_properties, construct_properties);
+
+  adaptor = GLADE_WIDGET_ADAPTOR (ret_obj);
+
+  glade_widget_adaptor_action_remove (adaptor, "add_parent");
+  glade_widget_adaptor_action_remove (adaptor, "remove_parent");
+
+  return ret_obj;
+}
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index 93e3e9e..9293a37 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -3358,6 +3358,14 @@
         </packing-properties>
       </glade-widget-class>
       
+      <glade-widget-class name="GtkPopover" generic-name="popover" _title="Popover">
+        <constructor-function>glade_gtk_popover_constructor</constructor-function>
+        <properties>
+          <property id="relative-to" ignore="True"/>
+          <property id="position" ignore="True"/>
+        </properties>
+      </glade-widget-class>
+
       <glade-widget-class name="GtkLinkButton" generic-name="linkbutton" _title="Link Button">
         <properties>
           <!-- The pspec of this prop says that the default is http://www.gtk.org but gtk_link_button_init() 
does
@@ -5406,6 +5414,7 @@
       <glade-widget-class-ref name="GtkInfoBar"/>
       <glade-widget-class-ref name="GtkStackSwitcher" />
       <glade-widget-class-ref name="GtkStackSidebar" />
+      <glade-widget-class-ref name="GtkPopover"/>
     </glade-widget-group>
     
     <glade-widget-group name="gtk-composite" _title="Composite Widgets">
diff --git a/plugins/gtk+/icons/16x16/Makefile.am b/plugins/gtk+/icons/16x16/Makefile.am
index ab60cf3..2601a11 100644
--- a/plugins/gtk+/icons/16x16/Makefile.am
+++ b/plugins/gtk+/icons/16x16/Makefile.am
@@ -79,6 +79,7 @@ icons_DATA = \
        widget-gtk-paned.png \
        widget-gtk-pagesetupdialog.png \
        widget-gtk-placessidebar.png \
+       widget-gtk-popover.png \
        widget-gtk-printdialog.png \
        widget-gtk-progressbar.png \
        widget-gtk-searchbar.png \
diff --git a/plugins/gtk+/icons/16x16/widget-gtk-popover.png b/plugins/gtk+/icons/16x16/widget-gtk-popover.png
new file mode 100644
index 0000000..5f82f3c
Binary files /dev/null and b/plugins/gtk+/icons/16x16/widget-gtk-popover.png differ
diff --git a/plugins/gtk+/icons/22x22/Makefile.am b/plugins/gtk+/icons/22x22/Makefile.am
index cf543d2..a08b04c 100644
--- a/plugins/gtk+/icons/22x22/Makefile.am
+++ b/plugins/gtk+/icons/22x22/Makefile.am
@@ -79,6 +79,7 @@ icons_DATA = \
        widget-gtk-paned.png \
        widget-gtk-pagesetupdialog.png \
        widget-gtk-placessidebar.png \
+       widget-gtk-popover.png \
        widget-gtk-printdialog.png \
        widget-gtk-progressbar.png \
        widget-gtk-searchbar.png \
diff --git a/plugins/gtk+/icons/22x22/widget-gtk-popover.png b/plugins/gtk+/icons/22x22/widget-gtk-popover.png
new file mode 100644
index 0000000..ac5e04c
Binary files /dev/null and b/plugins/gtk+/icons/22x22/widget-gtk-popover.png differ


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