mirror of
https://gitlab.gnome.org/GNOME/glade.git
synced 2025-12-07 00:03:12 -05:00
Revert "Remove GtkSwitch and GtkInfoBar support"
This reverts commit 746553e2029e3b646e75682804f874fa048d68ae.
This commit is contained in:
parent
31689f5bb3
commit
61e1c035c3
@ -45,7 +45,9 @@ libgladegtk_la_SOURCES = \
|
||||
glade-gtk-table.c \
|
||||
glade-gtk-grid.c \
|
||||
glade-gtk-action-widgets.c \
|
||||
glade-gtk-info-bar.c \
|
||||
glade-gtk-activatable.c \
|
||||
glade-gtk-switch.c \
|
||||
glade-gtk-marshallers.c
|
||||
|
||||
libgladegtk_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
|
||||
|
||||
53
plugins/gtk+/glade-gtk-info-bar.c
Normal file
53
plugins/gtk+/glade-gtk-info-bar.c
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* glade-gtk-info-bar.c
|
||||
*
|
||||
* Copyright (C) 2011 Juan Pablo Ugarte.
|
||||
*
|
||||
* Author:
|
||||
* Juan Pablo Ugarte <juanpablougarte@gmail.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 <gladeui/glade.h>
|
||||
#include "glade-gtk-action-widgets.h"
|
||||
|
||||
void
|
||||
glade_gtk_info_bar_read_child (GladeWidgetAdaptor *adaptor,
|
||||
GladeWidget *widget,
|
||||
GladeXmlNode *node)
|
||||
{
|
||||
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->read_child (adaptor, widget, node);
|
||||
|
||||
node = glade_xml_node_get_parent (node);
|
||||
|
||||
glade_gtk_action_widgets_read_child (widget, node, "action_area");
|
||||
}
|
||||
|
||||
void
|
||||
glade_gtk_info_bar_write_child (GladeWidgetAdaptor *adaptor,
|
||||
GladeWidget *widget,
|
||||
GladeXmlContext *context,
|
||||
GladeXmlNode *node)
|
||||
{
|
||||
GladeWidget *parent = glade_widget_get_parent (widget);
|
||||
|
||||
GWA_GET_CLASS (GTK_TYPE_BOX)->write_child (adaptor, widget, context, node);
|
||||
|
||||
if (parent && GTK_IS_INFO_BAR (glade_widget_get_object (parent)))
|
||||
glade_gtk_action_widgets_write_child (parent, context, node, "action_area");
|
||||
}
|
||||
71
plugins/gtk+/glade-gtk-switch.c
Normal file
71
plugins/gtk+/glade-gtk-switch.c
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* glade-gtk-switch.c
|
||||
*
|
||||
* Copyright (C) 2011 Juan Pablo Ugarte.
|
||||
*
|
||||
* Author:
|
||||
* Juan Pablo Ugarte <juanpablougarte@gmail.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 "glade-gtk-activatable.h"
|
||||
#include "glade-activatable-editor.h"
|
||||
|
||||
GladeEditable *
|
||||
glade_gtk_switch_create_editable (GladeWidgetAdaptor *adaptor,
|
||||
GladeEditorPageType type)
|
||||
{
|
||||
GladeEditable *editable;
|
||||
|
||||
/* Get base editable */
|
||||
editable = GWA_GET_CLASS (GTK_TYPE_WIDGET)->create_editable (adaptor, type);
|
||||
|
||||
if (type == GLADE_PAGE_GENERAL)
|
||||
return (GladeEditable *) glade_activatable_editor_new (adaptor, editable);
|
||||
|
||||
return editable;
|
||||
}
|
||||
|
||||
void
|
||||
glade_gtk_switch_post_create (GladeWidgetAdaptor *adaptor,
|
||||
GObject *widget,
|
||||
GladeCreateReason reason)
|
||||
{
|
||||
GladeWidget *gwidget;
|
||||
|
||||
if (reason != GLADE_CREATE_LOAD) return;
|
||||
|
||||
g_return_if_fail (GTK_IS_SWITCH (widget));
|
||||
gwidget = glade_widget_get_from_gobject (widget);
|
||||
g_return_if_fail (GLADE_IS_WIDGET (gwidget));
|
||||
|
||||
g_signal_connect (glade_widget_get_project (gwidget), "parse-finished",
|
||||
G_CALLBACK (glade_gtk_activatable_parse_finished),
|
||||
gwidget);
|
||||
}
|
||||
|
||||
void
|
||||
glade_gtk_switch_set_property (GladeWidgetAdaptor *adaptor,
|
||||
GObject *object,
|
||||
const gchar *id,
|
||||
const GValue *value)
|
||||
{
|
||||
glade_gtk_activatable_evaluate_property_sensitivity (object, id, value);
|
||||
|
||||
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
|
||||
}
|
||||
@ -3939,7 +3939,7 @@ glade_gtk_dialog_post_create (GladeWidgetAdaptor *adaptor,
|
||||
if (reason == GLADE_CREATE_USER)
|
||||
{
|
||||
/* HIG complient spacing defaults on dialogs */
|
||||
glade_widget_property_set (vbox_widget, _("spacing"), 2);
|
||||
glade_widget_property_set (vbox_widget, "spacing", 2);
|
||||
|
||||
if (GTK_IS_ABOUT_DIALOG (object) ||
|
||||
GTK_IS_FILE_CHOOSER_DIALOG (object))
|
||||
|
||||
@ -1112,6 +1112,22 @@ embedded in another object</_tooltip>
|
||||
</properties>
|
||||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="GtkSwitch" generic-name="switch" _title="Switch">
|
||||
<post-create-function>glade_gtk_switch_post_create</post-create-function>
|
||||
<set-property-function>glade_gtk_switch_set_property</set-property-function>
|
||||
<create-editable-function>glade_gtk_switch_create_editable</create-editable-function>
|
||||
<properties>
|
||||
<!-- GtkActivatable -->
|
||||
<property id="related-action" _name="Related Action" custom-layout="True">
|
||||
<parameter-spec>
|
||||
<type>GParamObject</type>
|
||||
<value-type>GtkToggleAction</value-type>
|
||||
</parameter-spec>
|
||||
</property>
|
||||
<property id="use-action-appearance" _name="Use Action Appearance" custom-layout="True" default="False"/>
|
||||
</properties>
|
||||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="GtkFileChooserButton" generic-name="filechooserbutton" _title="File Chooser Button">
|
||||
<set-property-function>glade_gtk_file_chooser_button_set_property</set-property-function>
|
||||
|
||||
@ -1758,6 +1774,27 @@ embedded in another object</_tooltip>
|
||||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="GtkDrawingArea" generic-name="drawingarea" _title="Drawing Area"/>
|
||||
|
||||
<glade-widget-class name="GtkInfoBar" generic-name="infobar" _title="Info Bar">
|
||||
<read-child-function>glade_gtk_info_bar_read_child</read-child-function>
|
||||
<write-child-function>glade_gtk_info_bar_write_child</write-child-function>
|
||||
<internal-children>
|
||||
<object name="action_area"/>
|
||||
<object name="content_area"/>
|
||||
</internal-children>
|
||||
<properties>
|
||||
<property id="message-type">
|
||||
<displayable-values>
|
||||
<value id="GTK_MESSAGE_INFO" _name="Info"/>
|
||||
<value id="GTK_MESSAGE_WARNING" _name="Warning"/>
|
||||
<value id="GTK_MESSAGE_QUESTION" _name="Question"/>
|
||||
<value id="GTK_MESSAGE_ERROR" _name="Error"/>
|
||||
<value id="GTK_MESSAGE_OTHER" _name="Other"/>
|
||||
</displayable-values>
|
||||
</property>
|
||||
<property id="size" query="True" ignore="True" disabled="True"/>
|
||||
</properties>
|
||||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="GtkEventBox" generic-name="eventbox" _title="Event Box"/>
|
||||
|
||||
@ -3736,6 +3773,7 @@ embedded in another object</_tooltip>
|
||||
<glade-widget-class-ref name="GtkToggleButton"/>
|
||||
<glade-widget-class-ref name="GtkCheckButton"/>
|
||||
<glade-widget-class-ref name="GtkRadioButton"/>
|
||||
<glade-widget-class-ref name="GtkSwitch"/>
|
||||
|
||||
<glade-widget-class-ref name="GtkEntry"/>
|
||||
<glade-widget-class-ref name="GtkSpinButton"/>
|
||||
@ -3774,6 +3812,8 @@ embedded in another object</_tooltip>
|
||||
<glade-widget-class-ref name="GtkSeparator"/>
|
||||
<glade-widget-class-ref name="GtkArrow"/>
|
||||
<glade-widget-class-ref name="GtkDrawingArea"/>
|
||||
|
||||
<glade-widget-class-ref name="GtkInfoBar"/>
|
||||
</glade-widget-group>
|
||||
|
||||
<glade-widget-group name="gtk-composite" _title="Composite Widgets">
|
||||
|
||||
@ -61,6 +61,7 @@ icons_DATA = \
|
||||
widget-gtk-iconview.png \
|
||||
widget-gtk-image.png \
|
||||
widget-gtk-imagemenuitem.png \
|
||||
widget-gtk-infobar.png \
|
||||
widget-gtk-inputdialog.png \
|
||||
widget-gtk-label.png \
|
||||
widget-gtk-layout.png \
|
||||
@ -103,6 +104,7 @@ icons_DATA = \
|
||||
widget-gtk-texttagtable.png \
|
||||
widget-gtk-textview.png \
|
||||
widget-gtk-togglebutton.png \
|
||||
widget-gtk-switch.png \
|
||||
widget-gtk-toggletoolbutton.png \
|
||||
widget-gtk-toolbar.png \
|
||||
widget-gtk-toolbutton.png \
|
||||
|
||||
@ -61,6 +61,7 @@ icons_DATA = \
|
||||
widget-gtk-iconview.png \
|
||||
widget-gtk-image.png \
|
||||
widget-gtk-imagemenuitem.png \
|
||||
widget-gtk-infobar.png \
|
||||
widget-gtk-inputdialog.png \
|
||||
widget-gtk-label.png \
|
||||
widget-gtk-layout.png \
|
||||
@ -103,6 +104,7 @@ icons_DATA = \
|
||||
widget-gtk-texttagtable.png \
|
||||
widget-gtk-textview.png \
|
||||
widget-gtk-togglebutton.png \
|
||||
widget-gtk-switch.png \
|
||||
widget-gtk-toggletoolbutton.png \
|
||||
widget-gtk-toolbar.png \
|
||||
widget-gtk-toolbutton.png \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user