Commit 87278d03 authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte

Implemented GladeProject properties dialog with glade

Added translation domain project property
parent 3291b484
## Previewer
include $(top_srcdir)/glade-rules.mk
bin_PROGRAMS = glade-previewer
lib_LTLIBRARIES = libgladeui-2.la
......@@ -43,12 +44,22 @@ common_defines = \
-DGLADE_BINDIR="\"$(bindir)\""\
-DGLADE_LIBDIR="\"$(libdir)\""
BUILT_SOURCES = glade-marshallers.c glade-marshallers.h
BUILT_SOURCES = \
glade-marshallers.c \
glade-marshallers.h \
gladeui-resources.c \
gladeui-resources.h
EXTRA_DIST = glade-marshallers.list gladeui.rc.in icon-naming-spec.c glade-previewer.rc.in
EXTRA_DIST = \
glade-marshallers.list \
gladeui.rc.in \
icon-naming-spec.c \
glade-previewer.rc.in \
gladeui-resources.gresource.xml
# The glade core library
libgladeui_2_la_SOURCES = \
gladeui-resources.c \
glade-debug.c \
glade-object-stub.c \
glade-xml-utils.c \
......@@ -145,6 +156,7 @@ libgladeuiinclude_HEADERS = \
glade-signal-model.h
noinst_HEADERS = \
gladeui-resources.h \
glade-marshallers.h \
glade-design-layout.h \
glade-object-stub.h \
......@@ -217,3 +229,9 @@ typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif
# This could be split in two, but its better to rebuild both, sources and header
# each time the xml or the actual resources files change, just in case.
gladeui-resources.c gladeui-resources.h: gladeui-resources.gresource.xml \
$(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies gladeui-resources.gresource.xml)
......@@ -33,6 +33,7 @@
#include "glade.h"
#include "glade-debug.h"
#include "gladeui-resources.h"
#include "glade-cursor.h"
#include "glade-catalog.h"
#include "glade-design-view.h"
......@@ -155,6 +156,8 @@ glade_app_finalize (GObject * app)
singleton_app = NULL;
check_initialised = FALSE;
gladeui_resources_unregister_resource ();
G_OBJECT_CLASS (glade_app_parent_class)->finalize (app);
}
......@@ -353,6 +356,8 @@ glade_init (void)
/* Register icons needed by the UI */
glade_app_register_stock_icons (GTK_ICON_SIZE_LARGE_TOOLBAR);
gladeui_resources_register_resource ();
init = TRUE;
}
......
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="glade">
<!-- interface-requires gtk+ 3.6 -->
<object class="GtkDialog" id="prefs_dialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<signal name="delete-event" handler="gtk_widget_hide_on_delete" swapped="no"/>
<signal name="response" handler="gtk_widget_hide" swapped="no"/>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">4</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_top">6</property>
<property name="row_spacing">4</property>
<property name="column_spacing">4</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Translation domain:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="domain_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Project properties:</property>
<property name="use_markup">True</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_top">6</property>
<property name="row_spacing">4</property>
<property name="column_spacing">4</property>
<child>
<object class="GtkRadioButton" id="resource_default_radio">
<property name="label" translatable="yes">From the project directory</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="resource_relative_radio">
<property name="label" translatable="yes">From a project relative directory</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">resource_default_radio</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="resource_fullpath_radio">
<property name="label" translatable="yes">From this directory</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">resource_default_radio</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="full_path_button">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="orientation">vertical</property>
<property name="action">select-folder</property>
<property name="title" translatable="yes">Choose a path to load image resources</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="relative_path_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="invisible_char"></property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Image resources are loaded locally:</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkBox" id="toolkit_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_top">6</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Toolkit version required:</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="spacing">4</property>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Verify versions and deprecations:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="verify_button">
<property name="label">gtk-execute</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="close_button">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">6</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-3">close_button</action-widget>
</action-widgets>
</object>
</interface>
This diff is collapsed.
......@@ -214,6 +214,10 @@ gchar *glade_project_display_dependencies (GladeProject *proj
GList *glade_project_toplevels (GladeProject *project);
void glade_project_set_translation_domain (GladeProject *project,
const gchar *domain);
const gchar *glade_project_get_translation_domain (GladeProject *project);
/* Verifications */
gchar *glade_project_verify_widget_adaptor(GladeProject *project,
GladeWidgetAdaptor *adaptor,
......
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/gladeui">
<file compressed="true" preprocess="xml-stripblanks">glade-project-properties.ui</file>
</gresource>
</gresources>
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