Commit 92592e15 authored by Tristan Van Berkom's avatar Tristan Van Berkom

Created GladeProjectProperties dialog

Split out the code in GladeProject and created a separate object implementing
the project properties dialog as a composite template widget.
parent ce301a0b
......@@ -107,6 +107,7 @@ libgladeui_2_la_SOURCES = \
glade-popup.c \
glade-preview.c \
glade-project.c \
glade-project-properties.c \
glade-property.c \
glade-property-class.c \
glade-property-label.c \
......@@ -176,16 +177,17 @@ libgladeuiinclude_HEADERS = \
glade-xml-utils.h
noinst_HEADERS = \
gladeui-resources.h \
glade-marshallers.h \
glade-accumulators.h \
glade-design-layout.h \
glade-design-private.h \
glade-marshallers.h \
glade-object-stub.h \
glade-path.h \
glade-popup.h \
glade-accumulators.h \
glade-design-private.h \
glade-preview-tokens.h \
glade-preview.h \
glade-path.h
glade-preview-tokens.h \
glade-project-properties.h \
gladeui-resources.h
if PLATFORM_WIN32
libgladeui_2_la_LDFLAGS += -no-undefined
......
This diff is collapsed.
/*
* Copyright (C) 2013 Tristan Van Berkom.
*
* 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.
*
* Authors:
* Tristan Van Berkom <tvb@gnome.org>
*/
#ifndef __GLADE_PROJECT_PROPERTIES_H__
#define __GLADE_PROJECT_PROPERTIES_H__
#include <gtk/gtk.h>
#include <gladeui/glade-xml-utils.h>
G_BEGIN_DECLS
#define GLADE_TYPE_PROJECT_PROPERTIES (glade_project_properties_get_type ())
#define GLADE_PROJECT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST \
((obj), GLADE_TYPE_PROJECT_PROPERTIES, GladeProjectProperties))
#define GLADE_PROJECT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
((klass), GLADE_TYPE_PROJECT_PROPERTIES, GladeProjectPropertiesClass))
#define GLADE_IS_PROJECT_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_PROJECT_PROPERTIES))
#define GLADE_IS_PROJECT_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_PROJECT_PROPERTIES))
#define GLADE_PROJECT_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
((obj), GLADE_TYPE_PROJECT_PROPERTIES, GladeProjectPropertiesClass))
typedef struct _GladeProjectProperties GladeProjectProperties;
typedef struct _GladeProjectPropertiesClass GladeProjectPropertiesClass;
typedef struct _GladeProjectPropertiesPrivate GladeProjectPropertiesPrivate;
struct _GladeProjectProperties
{
/*< private >*/
GtkDialog dialog;
GladeProjectPropertiesPrivate *priv;
};
struct _GladeProjectPropertiesClass
{
GtkDialogClass parent_class;
};
GType glade_project_properties_get_type (void) G_GNUC_CONST;
GtkWidget *glade_project_properties_new (GladeProject *project);
G_END_DECLS
#endif /* __GLADE_PROJECT_PROPERTIES_H__ */
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="glade">
<!-- interface-requires gtk+ 3.6 -->
<object class="GtkDialog" id="prefs_dialog">
<!-- interface-requires gtk+ 3.8 -->
<template class="GladeProjectProperties" parent="GtkDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="resizable">False</property>
......@@ -54,6 +54,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<signal name="changed" handler="on_domain_entry_changed" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -67,6 +68,7 @@
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<signal name="changed" handler="on_template_combo_box_changed" swapped="no"/>
<child>
<object class="GtkCellRendererPixbuf" id="cellrenderertext1"/>
<attributes>
......@@ -95,6 +97,7 @@
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_template_checkbutton_toggled" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -146,6 +149,7 @@
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="resource_default_toggled" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -164,6 +168,7 @@
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">resource_default_radio</property>
<signal name="toggled" handler="resource_relative_toggled" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -182,6 +187,7 @@
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">resource_default_radio</property>
<signal name="toggled" handler="resource_fullpath_toggled" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -198,6 +204,7 @@
<property name="orientation">vertical</property>
<property name="action">select-folder</property>
<property name="title" translatable="yes">Choose a path to load image resources</property>
<signal name="file-set" handler="resource_full_path_set" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -212,6 +219,7 @@
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="invisible_char"></property>
<signal name="activate" handler="resource_path_activated" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -294,6 +302,7 @@
<property name="tooltip_text" translatable="yes">Verify that the project does not use any properties,
signals or widgets which are not available in the target version</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="verify_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
......@@ -329,5 +338,5 @@ signals or widgets which are not available in the target version</property>
<action-widgets>
<action-widget response="-3">close_button</action-widget>
</action-widgets>
</object>
</template>
</interface>
This diff is collapsed.
......@@ -154,6 +154,9 @@ void glade_project_preview (GladeProject *proj
void glade_project_properties (GladeProject *project);
gchar *glade_project_resource_fullpath (GladeProject *project,
const gchar *resource);
void glade_project_set_resource_path (GladeProject *project,
const gchar *path);
const gchar *glade_project_get_resource_path (GladeProject *project);
void glade_project_widget_visibility_changed (GladeProject *project,
GladeWidget *widget,
......@@ -251,6 +254,9 @@ void glade_project_set_translation_domain (GladeProject *project,
const gchar *glade_project_get_translation_domain (GladeProject *project);
/* Verifications */
gboolean glade_project_verify (GladeProject *project,
gboolean saving,
GladeVerifyFlags flags);
gchar *glade_project_verify_widget_adaptor(GladeProject *project,
GladeWidgetAdaptor *adaptor,
GladeSupportMask *mask);
......
......@@ -33,6 +33,7 @@ gladeui/glade-popup.c
gladeui/glade-preview.c
gladeui/glade-previewer.c
gladeui/glade-project.c
gladeui/glade-project-properties.c
gladeui/glade-property.c
gladeui/glade-property-class.c
gladeui/glade-property-label.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment