mirror of
https://gitlab.gnome.org/GNOME/glade.git
synced 2025-06-25 00:03:40 -04:00
Compare commits
47 Commits
master
...
GLADE_3_12
Author | SHA1 | Date | |
---|---|---|---|
|
947c909d96 | ||
|
b9485a955b | ||
|
645e749b50 | ||
|
509849d3bc | ||
|
cfabe76ac6 | ||
|
4494d347fa | ||
|
0422ff71a6 | ||
|
0feb1d60f6 | ||
|
afafb04f3e | ||
|
cbe3a8d872 | ||
|
43da72092d | ||
|
5afe1e90af | ||
|
83119a90f5 | ||
|
4e1e77d027 | ||
|
4b84daf2df | ||
|
faf44c1d0d | ||
|
5ac8115fd0 | ||
|
99961286c0 | ||
|
bcf33eb38b | ||
|
0d94a1676a | ||
|
307d64e287 | ||
|
04327328cc | ||
|
d64b28e1f2 | ||
|
00bf025ab2 | ||
|
1ba51ede2c | ||
|
91738d088e | ||
|
5b9ef21305 | ||
|
945eca8900 | ||
|
8d6a2c6382 | ||
|
bde2bb0695 | ||
|
0060114efc | ||
|
b5785c36f8 | ||
|
6b621f52ac | ||
|
af34f54a52 | ||
|
03f19ce6b2 | ||
|
e406272d2c | ||
|
d637753991 | ||
|
869ef5fb04 | ||
|
1cb4102e10 | ||
|
85bfc72aec | ||
|
4f53fd5903 | ||
|
5cc1652d18 | ||
|
e2f7971bc1 | ||
|
b745b3f3e6 | ||
|
0d1939d7a0 | ||
|
ef763ba43f | ||
|
5623a75e43 |
103
ChangeLog
103
ChangeLog
@ -1,3 +1,106 @@
|
|||||||
|
2012-05-06 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||||
|
|
||||||
|
* configure.ac, NEWS: Rolling 3.12.1 bugfix release
|
||||||
|
|
||||||
|
2012-05-03 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||||
|
|
||||||
|
* gladeui/glade-utils.c: Reworked glade_util_get_placeholder_from_pointer()
|
||||||
|
to use gdk_device_get_window_at_position() to get the placeholder window from the pointer.
|
||||||
|
|
||||||
|
* src/glade-window.c: Use glade_util_get_placeholder_from_pointer() in paste action activate
|
||||||
|
|
||||||
|
* gladeui/glade-popup.c: Fixed bug #675395
|
||||||
|
"Using right click to add a widget over a placeholder do not work as expected every time"
|
||||||
|
|
||||||
|
2012-05-02 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||||
|
|
||||||
|
* plugins/gtk+/gtk+.xml.in: Set GtkCheckButton:xalign save-always.
|
||||||
|
Fixes bug #675042 "plugins/gtk+.xml.in: always store GtkButton [x|y]align properties"
|
||||||
|
|
||||||
|
2012-04-28 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||||
|
|
||||||
|
* gladeui/glade-base-editor.c,
|
||||||
|
gladeui/glade-design-layout.c,
|
||||||
|
gladeui/glade-design-view.c,
|
||||||
|
gladeui/glade-editor-property.c,
|
||||||
|
gladeui/glade-editor.c,
|
||||||
|
gladeui/glade-named-icon-chooser-dialog.c,
|
||||||
|
gladeui/glade-palette.c,
|
||||||
|
gladeui/glade-project.c,
|
||||||
|
gladeui/glade-widget-adaptor.c,
|
||||||
|
plugins/gtk+/glade-accels.c,
|
||||||
|
plugins/gtk+/glade-attributes.c,
|
||||||
|
plugins/gtk+/glade-button-editor.c,
|
||||||
|
plugins/gtk+/glade-cell-renderer-editor.c,
|
||||||
|
plugins/gtk+/glade-column-types.c,
|
||||||
|
plugins/gtk+/glade-entry-editor.c,
|
||||||
|
plugins/gtk+/glade-icon-factory-editor.c,
|
||||||
|
plugins/gtk+/glade-icon-sources.c,
|
||||||
|
plugins/gtk+/glade-image-editor.c,
|
||||||
|
plugins/gtk+/glade-image-item-editor.c,
|
||||||
|
plugins/gtk+/glade-label-editor.c,
|
||||||
|
plugins/gtk+/glade-model-data.c,
|
||||||
|
plugins/gtk+/glade-store-editor.c,
|
||||||
|
plugins/gtk+/glade-text-button.c,
|
||||||
|
plugins/gtk+/glade-tool-button-editor.c,
|
||||||
|
plugins/gtk+/glade-tool-item-group-editor.c,
|
||||||
|
plugins/gtk+/glade-treeview-editor.c:
|
||||||
|
Removed use of deprecated GtkHBox, GtkVBox and others
|
||||||
|
|
||||||
|
2012-04-25 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||||
|
|
||||||
|
* gladeui/glade-design-view.c: Added custom style provider to setup
|
||||||
|
viewport background color to @base_color
|
||||||
|
|
||||||
|
* gladeui/glade-design-layout.c:
|
||||||
|
o Added custom stype provider to setup bg color to @base_color.
|
||||||
|
o Simplyfied glade_design_layout_style_updated() using gtk_style_context_lookup_color()
|
||||||
|
o Removed old theme hack widget_reset_bg_color()
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-accels.c: Replaced strcmp() with g_strcmp0 in glade_eprop_accel_populate_view()
|
||||||
|
|
||||||
|
2012-04-03 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||||
|
|
||||||
|
* gladeui/glade-inspector.c: Removed use of deprecated object GCompletion
|
||||||
|
|
||||||
|
* gladeui/glade-property-class.c: replaced deprecated function g_value_get_char with g_value_get_schar()
|
||||||
|
|
||||||
|
2012-03-31 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||||
|
|
||||||
|
* gladeui/glade-signal-editor.c: Fixed memory leak on handler-suggestion emison
|
||||||
|
|
||||||
|
2012-03-26 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||||
|
|
||||||
|
* configure.ac, NEWS: Rolling 3.12.0 (Bumped GTK dependency to 3.4)
|
||||||
|
|
||||||
|
2012-03-19 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||||
|
|
||||||
|
* gladeui/glade-accumulators.[ch]: Added new accumulator _glade_strv_handled_accumulator()
|
||||||
|
|
||||||
|
* gladeui/glade-marshallers.list: Added new marshall BOXED:OBJECT
|
||||||
|
|
||||||
|
* gladeui/glade-signal-editor.[ch]:
|
||||||
|
o Implemented GladeSignalEditor::callback-suggestions signal
|
||||||
|
(based on patch by Marco Diego Aurélio Mesquita <marcodiegomesquita@gmail.com >)
|
||||||
|
Closes bug #667570 "Implement callback name suggestion on glade-signal-editor"
|
||||||
|
o Added GladeSignalEditor:widget object property
|
||||||
|
|
||||||
|
* gladeui/glade-signal-model.c: Fixed bogus runtime warning in
|
||||||
|
glade_signal_model_iter_n_children() when it is called with a NULL iter
|
||||||
|
Fixed space identation (we use * next to the variable name)
|
||||||
|
|
||||||
|
2012-02-17 Marco Diego Aurélio Mesquita <marcodiegomesquita@gmail.com>
|
||||||
|
|
||||||
|
* gladeui/glade-signal-editor.[ch]: Fixed bug 669272 "Emit a signal to notify signal activation"
|
||||||
|
|
||||||
|
2012-02-15 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk-grid.c: Fix bug 664912 "GtkGrid assumes 3x3 (edit)"
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c: Fixed bug 645340 "Minor string typo"
|
||||||
|
|
||||||
|
* plugins/gtk+/gtk+.xml.in: Fixed bug 646366 "non-sense UI string"
|
||||||
|
|
||||||
2012-02-13 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
2012-02-13 Juan Pablo Ugarte <juanpablougarte@gmail.com>
|
||||||
|
|
||||||
* configure.ac, NEWS: Rolling 3.11.0
|
* configure.ac, NEWS: Rolling 3.11.0
|
||||||
|
22
NEWS
22
NEWS
@ -1,3 +1,25 @@
|
|||||||
|
============
|
||||||
|
Glade 3.12.1
|
||||||
|
============
|
||||||
|
|
||||||
|
- Use glade_util_get_placeholder_from_pointer() in paste action activate
|
||||||
|
- Fixed bug #675395 "Using right click to add a widget over a placeholder do not work as expected every time"
|
||||||
|
- Fixed bug #675042 "plugins/gtk+.xml.in: always store GtkButton [x|y]align properties"
|
||||||
|
- Added custom style provider to setup GladeDesignView and GladeDesignLayout background color to @base_color
|
||||||
|
- Fixed memory leak on GladeSignalEditor::callback-suggestions emison
|
||||||
|
- Removed use of lots of deprecated functions
|
||||||
|
|
||||||
|
============
|
||||||
|
Glade 3.12.0
|
||||||
|
============
|
||||||
|
|
||||||
|
- Implemented GladeSignalEditor::callback-suggestions signal based
|
||||||
|
on patch by Marco Diego Aurélio Mesquita, closes bug #667570
|
||||||
|
"Implement callback name suggestion on glade-signal-editor"
|
||||||
|
- Fixed bug 664912 "GtkGrid assumes 3x3 (edit)"
|
||||||
|
- Fixed bug 645340 "Minor string typo" and bug 646366 "non-sense UI string"
|
||||||
|
- Fixed bug 669272 "Emit a signal to notify signal activation" by Marco Diego Aurélio Mesquita
|
||||||
|
|
||||||
============
|
============
|
||||||
Glade 3.11.0
|
Glade 3.11.0
|
||||||
============
|
============
|
||||||
|
@ -3,8 +3,8 @@ dnl Process this file with autoconf to produce a configure script.
|
|||||||
AC_PREREQ(2.52)
|
AC_PREREQ(2.52)
|
||||||
|
|
||||||
m4_define(glade_major_version, 3)
|
m4_define(glade_major_version, 3)
|
||||||
m4_define(glade_minor_version, 11)
|
m4_define(glade_minor_version, 12)
|
||||||
m4_define(glade_micro_version, 0)
|
m4_define(glade_micro_version, 1)
|
||||||
m4_define(glade_version, glade_major_version.glade_minor_version.glade_micro_version)
|
m4_define(glade_version, glade_major_version.glade_minor_version.glade_micro_version)
|
||||||
|
|
||||||
AC_INIT([glade], [glade_version],
|
AC_INIT([glade], [glade_version],
|
||||||
@ -127,7 +127,7 @@ GOBJECT_INTROSPECTION_CHECK([0.10.1])
|
|||||||
dnl ================================================================
|
dnl ================================================================
|
||||||
dnl Check for gtk+
|
dnl Check for gtk+
|
||||||
dnl ================================================================
|
dnl ================================================================
|
||||||
GTK_REQUIRED=3.2.3
|
GTK_REQUIRED=3.4.0
|
||||||
PKG_CHECK_MODULES([GTK],[
|
PKG_CHECK_MODULES([GTK],[
|
||||||
gtk+-3.0 >= $GTK_REQUIRED
|
gtk+-3.0 >= $GTK_REQUIRED
|
||||||
gmodule-2.0
|
gmodule-2.0
|
||||||
|
@ -88,6 +88,19 @@ _glade_string_accumulator (GSignalInvocationHint * ihint,
|
|||||||
return (handler_str == NULL);
|
return (handler_str == NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
_glade_strv_handled_accumulator (GSignalInvocationHint *ihint,
|
||||||
|
GValue *return_accu,
|
||||||
|
const GValue *handler_return, gpointer dummy)
|
||||||
|
{
|
||||||
|
const gchar **handler_strv;
|
||||||
|
|
||||||
|
handler_strv = g_value_get_boxed (handler_return);
|
||||||
|
g_value_set_boxed (return_accu, handler_strv);
|
||||||
|
|
||||||
|
return (handler_strv == NULL);
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
_glade_stop_emission_accumulator (GSignalInvocationHint *ihint,
|
_glade_stop_emission_accumulator (GSignalInvocationHint *ihint,
|
||||||
GValue *return_accu,
|
GValue *return_accu,
|
||||||
|
@ -25,6 +25,11 @@ gboolean _glade_string_accumulator (GSignalInvocationHint *ihint,
|
|||||||
const GValue *handler_return,
|
const GValue *handler_return,
|
||||||
gpointer dummy);
|
gpointer dummy);
|
||||||
|
|
||||||
|
gboolean _glade_strv_handled_accumulator (GSignalInvocationHint *ihint,
|
||||||
|
GValue *return_accu,
|
||||||
|
const GValue *handler_return,
|
||||||
|
gpointer dummy);
|
||||||
|
|
||||||
gboolean _glade_stop_emission_accumulator (GSignalInvocationHint *ihint,
|
gboolean _glade_stop_emission_accumulator (GSignalInvocationHint *ihint,
|
||||||
GValue *return_accu,
|
GValue *return_accu,
|
||||||
const GValue *handler_return,
|
const GValue *handler_return,
|
||||||
|
@ -1688,7 +1688,7 @@ glade_base_editor_init (GladeBaseEditor * editor)
|
|||||||
e = editor->priv = g_new0 (GladeBaseEditorPrivate, 1);
|
e = editor->priv = g_new0 (GladeBaseEditorPrivate, 1);
|
||||||
|
|
||||||
/* Paned */
|
/* Paned */
|
||||||
e->paned = paned = gtk_vpaned_new ();
|
e->paned = paned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||||
gtk_widget_show (paned);
|
gtk_widget_show (paned);
|
||||||
gtk_box_pack_start (GTK_BOX (editor), e->paned, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (editor), e->paned, TRUE, TRUE, 0);
|
||||||
|
|
||||||
@ -1711,7 +1711,7 @@ glade_base_editor_init (GladeBaseEditor * editor)
|
|||||||
gtk_notebook_append_page (GTK_NOTEBOOK (e->notebook), e->main_scroll, label);
|
gtk_notebook_append_page (GTK_NOTEBOOK (e->notebook), e->main_scroll, label);
|
||||||
|
|
||||||
/* Hbox */
|
/* Hbox */
|
||||||
hbox = gtk_hbox_new (FALSE, 8);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
|
|
||||||
/* translators: refers to a tab name used to show the widget hierarchy */
|
/* translators: refers to a tab name used to show the widget hierarchy */
|
||||||
@ -1720,7 +1720,7 @@ glade_base_editor_init (GladeBaseEditor * editor)
|
|||||||
gtk_notebook_append_page (GTK_NOTEBOOK (e->notebook), hbox, label);
|
gtk_notebook_append_page (GTK_NOTEBOOK (e->notebook), hbox, label);
|
||||||
|
|
||||||
/* TreeView Vbox */
|
/* TreeView Vbox */
|
||||||
tree_vbox = gtk_vbox_new (FALSE, 8);
|
tree_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||||
gtk_widget_show (tree_vbox);
|
gtk_widget_show (tree_vbox);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), tree_vbox, FALSE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), tree_vbox, FALSE, TRUE, 0);
|
||||||
|
|
||||||
@ -1798,7 +1798,7 @@ glade_base_editor_init (GladeBaseEditor * editor)
|
|||||||
gtk_table_attach_defaults (GTK_TABLE (button_table), button, 1, 2, 0, 1);
|
gtk_table_attach_defaults (GTK_TABLE (button_table), button, 1, 2, 0, 1);
|
||||||
|
|
||||||
/* Properties Vbox */
|
/* Properties Vbox */
|
||||||
vbox = gtk_vbox_new (FALSE, 8);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
||||||
|
|
||||||
@ -2245,7 +2245,7 @@ glade_base_editor_pack_new_window (GladeBaseEditor * editor,
|
|||||||
G_CALLBACK (gtk_widget_destroy), window);
|
G_CALLBACK (gtk_widget_destroy), window);
|
||||||
|
|
||||||
/* Button Box */
|
/* Button Box */
|
||||||
buttonbox = gtk_hbutton_box_new ();
|
buttonbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
gtk_widget_show (buttonbox);
|
gtk_widget_show (buttonbox);
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (buttonbox), GTK_BUTTONBOX_END);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (buttonbox), GTK_BUTTONBOX_END);
|
||||||
gtk_box_set_spacing (GTK_BOX (buttonbox), 8);
|
gtk_box_set_spacing (GTK_BOX (buttonbox), 8);
|
||||||
|
@ -708,7 +708,8 @@ glade_command_set_properties_list (GladeProject * project, GList * props)
|
|||||||
void
|
void
|
||||||
glade_command_set_properties (GladeProperty *property,
|
glade_command_set_properties (GladeProperty *property,
|
||||||
const GValue *old_value,
|
const GValue *old_value,
|
||||||
const GValue * new_value, ...)
|
const GValue *new_value,
|
||||||
|
...)
|
||||||
{
|
{
|
||||||
GCSetPropData *sdata;
|
GCSetPropData *sdata;
|
||||||
GladeProperty *prop;
|
GladeProperty *prop;
|
||||||
@ -759,8 +760,7 @@ glade_command_set_properties (GladeProperty * property,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
glade_command_set_property_value (GladeProperty * property,
|
glade_command_set_property_value (GladeProperty *property, const GValue *pvalue)
|
||||||
const GValue * pvalue)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Dont generate undo/redo items for unchanging property values.
|
/* Dont generate undo/redo items for unchanging property values.
|
||||||
@ -855,8 +855,7 @@ glade_command_set_name_finalize (GObject * obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
glade_command_set_name_unifies (GladeCommand * this_cmd,
|
glade_command_set_name_unifies (GladeCommand *this_cmd, GladeCommand *other_cmd)
|
||||||
GladeCommand * other_cmd)
|
|
||||||
{
|
{
|
||||||
GladeCommandSetName *cmd1;
|
GladeCommandSetName *cmd1;
|
||||||
GladeCommandSetName *cmd2;
|
GladeCommandSetName *cmd2;
|
||||||
@ -1089,17 +1088,7 @@ glade_command_add (GList *widgets,
|
|||||||
else if (cdata->parent &&
|
else if (cdata->parent &&
|
||||||
glade_widget_placeholder_relation (cdata->parent, widget))
|
glade_widget_placeholder_relation (cdata->parent, widget))
|
||||||
{
|
{
|
||||||
GtkContainer *cont = GTK_CONTAINER (glade_widget_get_object (cdata->parent));
|
if ((children =
|
||||||
|
|
||||||
child = glade_util_get_placeholder_from_pointer (cont);
|
|
||||||
|
|
||||||
if (child && g_list_find (placeholders, child) == NULL)
|
|
||||||
{
|
|
||||||
placeholders = g_list_append (placeholders, child);
|
|
||||||
glade_command_placeholder_connect
|
|
||||||
(cdata, GLADE_PLACEHOLDER (child));
|
|
||||||
}
|
|
||||||
else if ((children =
|
|
||||||
glade_widget_adaptor_get_children (glade_widget_get_adaptor (cdata->parent),
|
glade_widget_adaptor_get_children (glade_widget_get_adaptor (cdata->parent),
|
||||||
glade_widget_get_object (cdata->parent))) != NULL)
|
glade_widget_get_object (cdata->parent))) != NULL)
|
||||||
{
|
{
|
||||||
@ -1572,8 +1561,10 @@ glade_command_add_remove_collapse (GladeCommand * this_cmd,
|
|||||||
* Returns: the newly created widget.
|
* Returns: the newly created widget.
|
||||||
*/
|
*/
|
||||||
GladeWidget *
|
GladeWidget *
|
||||||
glade_command_create (GladeWidgetAdaptor * adaptor, GladeWidget * parent,
|
glade_command_create (GladeWidgetAdaptor *adaptor,
|
||||||
GladePlaceholder * placeholder, GladeProject * project)
|
GladeWidget *parent,
|
||||||
|
GladePlaceholder *placeholder,
|
||||||
|
GladeProject *project)
|
||||||
{
|
{
|
||||||
GladeWidget *widget;
|
GladeWidget *widget;
|
||||||
GList *widgets = NULL;
|
GList *widgets = NULL;
|
||||||
@ -1661,8 +1652,7 @@ glade_command_cut (GList * widgets)
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void
|
static void
|
||||||
glade_command_break_references_for_widget (GladeWidget * widget,
|
glade_command_break_references_for_widget (GladeWidget *widget, GList *widgets)
|
||||||
GList * widgets)
|
|
||||||
{
|
{
|
||||||
GList *l, *children;
|
GList *l, *children;
|
||||||
|
|
||||||
@ -1732,7 +1722,8 @@ glade_command_break_references (GladeProject * project, GList * widgets)
|
|||||||
* will be used when pasting toplevel objects).
|
* will be used when pasting toplevel objects).
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
glade_command_paste (GList * widgets, GladeWidget * parent,
|
glade_command_paste (GList *widgets,
|
||||||
|
GladeWidget *parent,
|
||||||
GladePlaceholder *placeholder,
|
GladePlaceholder *placeholder,
|
||||||
GladeProject *project)
|
GladeProject *project)
|
||||||
{
|
{
|
||||||
@ -1774,7 +1765,8 @@ glade_command_paste (GList * widgets, GladeWidget * parent,
|
|||||||
* parent; the active project will be used when pasting toplevel objects).
|
* parent; the active project will be used when pasting toplevel objects).
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
glade_command_dnd (GList * widgets, GladeWidget * parent,
|
glade_command_dnd (GList *widgets,
|
||||||
|
GladeWidget *parent,
|
||||||
GladePlaceholder *placeholder)
|
GladePlaceholder *placeholder)
|
||||||
{
|
{
|
||||||
GladeWidget *widget;
|
GladeWidget *widget;
|
||||||
@ -1937,8 +1929,7 @@ glade_command_add_remove_change_signal (GladeWidget * glade_widget,
|
|||||||
* TODO: write me
|
* TODO: write me
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
glade_command_add_signal (GladeWidget * glade_widget,
|
glade_command_add_signal (GladeWidget *glade_widget, const GladeSignal *signal)
|
||||||
const GladeSignal * signal)
|
|
||||||
{
|
{
|
||||||
glade_command_add_remove_change_signal
|
glade_command_add_remove_change_signal
|
||||||
(glade_widget, signal, NULL, GLADE_ADD);
|
(glade_widget, signal, NULL, GLADE_ADD);
|
||||||
@ -2058,8 +2049,7 @@ glade_command_set_i18n_finalize (GObject * obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
glade_command_set_i18n_unifies (GladeCommand * this_cmd,
|
glade_command_set_i18n_unifies (GladeCommand *this_cmd, GladeCommand *other_cmd)
|
||||||
GladeCommand * other_cmd)
|
|
||||||
{
|
{
|
||||||
GladeCommandSetI18n *cmd1;
|
GladeCommandSetI18n *cmd1;
|
||||||
GladeCommandSetI18n *cmd2;
|
GladeCommandSetI18n *cmd2;
|
||||||
@ -2111,7 +2101,8 @@ glade_command_set_i18n_collapse (GladeCommand * this_cmd,
|
|||||||
void
|
void
|
||||||
glade_command_set_i18n (GladeProperty *property,
|
glade_command_set_i18n (GladeProperty *property,
|
||||||
gboolean translatable,
|
gboolean translatable,
|
||||||
const gchar * context, const gchar * comment)
|
const gchar *context,
|
||||||
|
const gchar *comment)
|
||||||
{
|
{
|
||||||
GladeCommandSetI18n *me;
|
GladeCommandSetI18n *me;
|
||||||
|
|
||||||
|
@ -85,6 +85,7 @@ struct _GladeDesignLayoutPrivate
|
|||||||
|
|
||||||
/* Colors */
|
/* Colors */
|
||||||
GdkRGBA fg_color;
|
GdkRGBA fg_color;
|
||||||
|
GdkRGBA bg_color;
|
||||||
GdkRGBA frame_color[2];
|
GdkRGBA frame_color[2];
|
||||||
GdkRGBA frame_color_active[2];
|
GdkRGBA frame_color_active[2];
|
||||||
|
|
||||||
@ -924,24 +925,6 @@ on_glade_widget_name_notify (GObject *gobject, GParamSpec *pspec, GladeDesignLay
|
|||||||
gtk_widget_queue_resize (GTK_WIDGET (layout));
|
gtk_widget_queue_resize (GTK_WIDGET (layout));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
widget_reset_bg_color (GtkWidget *widget)
|
|
||||||
{
|
|
||||||
GtkStyleContext *context = gtk_style_context_new ();
|
|
||||||
GtkWidgetPath *path = gtk_widget_path_new ();
|
|
||||||
GdkRGBA bg_color;
|
|
||||||
|
|
||||||
gtk_widget_path_append_type (path, G_OBJECT_TYPE (widget));
|
|
||||||
gtk_style_context_set_path (context, path);
|
|
||||||
gtk_widget_path_free (path);
|
|
||||||
|
|
||||||
gtk_style_context_get_background_color (context, GTK_STATE_FLAG_NORMAL, &bg_color);
|
|
||||||
gtk_widget_override_background_color (widget, GTK_STATE_FLAG_NORMAL, &bg_color);
|
|
||||||
|
|
||||||
g_object_unref (context);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
glade_design_layout_add (GtkContainer *container, GtkWidget *widget)
|
glade_design_layout_add (GtkContainer *container, GtkWidget *widget)
|
||||||
{
|
{
|
||||||
@ -952,11 +935,6 @@ glade_design_layout_add (GtkContainer *container, GtkWidget *widget)
|
|||||||
layout->priv->current_width = 0;
|
layout->priv->current_width = 0;
|
||||||
layout->priv->current_height = 0;
|
layout->priv->current_height = 0;
|
||||||
|
|
||||||
/*FIXME: Adwaita theme, for some unknown reason, overwrites the window default bg.
|
|
||||||
* This is a workaround to reset it to the default value.
|
|
||||||
*/
|
|
||||||
widget_reset_bg_color (widget);
|
|
||||||
|
|
||||||
gtk_widget_set_parent_window (widget, priv->offscreen_window);
|
gtk_widget_set_parent_window (widget, priv->offscreen_window);
|
||||||
|
|
||||||
GTK_CONTAINER_CLASS (glade_design_layout_parent_class)->add (container,
|
GTK_CONTAINER_CLASS (glade_design_layout_parent_class)->add (container,
|
||||||
@ -1677,7 +1655,7 @@ glade_design_layout_realize (GtkWidget * widget)
|
|||||||
|
|
||||||
context = gtk_widget_get_style_context (widget);
|
context = gtk_widget_get_style_context (widget);
|
||||||
gtk_style_context_set_background (context, priv->window);
|
gtk_style_context_set_background (context, priv->window);
|
||||||
gtk_style_context_set_background (context, priv->offscreen_window);
|
gdk_window_set_background_rgba (priv->offscreen_window, &priv->bg_color);
|
||||||
gdk_window_show (priv->offscreen_window);
|
gdk_window_show (priv->offscreen_window);
|
||||||
|
|
||||||
gdk_window_set_cursor (priv->window, NULL);
|
gdk_window_set_cursor (priv->window, NULL);
|
||||||
@ -1694,7 +1672,7 @@ glade_design_layout_realize (GtkWidget * widget)
|
|||||||
priv->cursors[ACTIVITY_MARGINS_TOP_LEFT] = gdk_cursor_new_for_display (display, GDK_TOP_LEFT_CORNER);
|
priv->cursors[ACTIVITY_MARGINS_TOP_LEFT] = gdk_cursor_new_for_display (display, GDK_TOP_LEFT_CORNER);
|
||||||
priv->cursors[ACTIVITY_MARGINS_TOP_RIGHT] = gdk_cursor_new_for_display (display, GDK_TOP_RIGHT_CORNER);
|
priv->cursors[ACTIVITY_MARGINS_TOP_RIGHT] = gdk_cursor_new_for_display (display, GDK_TOP_RIGHT_CORNER);
|
||||||
priv->cursors[ACTIVITY_MARGINS_BOTTOM_LEFT] = gdk_cursor_new_for_display (display, GDK_BOTTOM_LEFT_CORNER);
|
priv->cursors[ACTIVITY_MARGINS_BOTTOM_LEFT] = gdk_cursor_new_for_display (display, GDK_BOTTOM_LEFT_CORNER);
|
||||||
priv->cursors[ACTIVITY_MARGINS_BOTTOM_RIGHT] = gdk_cursor_ref (priv->cursors[ACTIVITY_RESIZE_WIDTH_AND_HEIGHT]);
|
priv->cursors[ACTIVITY_MARGINS_BOTTOM_RIGHT] = g_object_ref (priv->cursors[ACTIVITY_RESIZE_WIDTH_AND_HEIGHT]);
|
||||||
|
|
||||||
priv->widget_name = pango_layout_new (gtk_widget_get_pango_context (widget));
|
priv->widget_name = pango_layout_new (gtk_widget_get_pango_context (widget));
|
||||||
}
|
}
|
||||||
@ -1719,7 +1697,7 @@ glade_design_layout_unrealize (GtkWidget * widget)
|
|||||||
{
|
{
|
||||||
if (priv->cursors[i])
|
if (priv->cursors[i])
|
||||||
{
|
{
|
||||||
gdk_cursor_unref (priv->cursors[i]);
|
g_object_unref (priv->cursors[i]);
|
||||||
priv->cursors[i] = NULL;
|
priv->cursors[i] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1739,46 +1717,24 @@ static void
|
|||||||
glade_design_layout_style_updated (GtkWidget *widget)
|
glade_design_layout_style_updated (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
GladeDesignLayoutPrivate *priv = GLADE_DESIGN_LAYOUT_GET_PRIVATE (widget);
|
GladeDesignLayoutPrivate *priv = GLADE_DESIGN_LAYOUT_GET_PRIVATE (widget);
|
||||||
GtkStyleContext *context = gtk_style_context_new ();
|
GtkStyleContext *context = gtk_widget_get_style_context (widget);
|
||||||
GtkWidgetPath *path = gtk_widget_path_new ();
|
|
||||||
GdkRGBA bg_color;
|
|
||||||
|
|
||||||
g_type_class_ref (GTK_TYPE_TREE_VIEW);
|
gtk_style_context_lookup_color (context, "fg_color", &priv->fg_color);
|
||||||
gtk_widget_path_append_type (path, GTK_TYPE_WIDGET);
|
gtk_style_context_lookup_color (context, "bg_color", &priv->frame_color[0]);
|
||||||
gtk_style_context_set_path (context, path);
|
gtk_style_context_lookup_color (context, "selected_bg_color", &priv->frame_color_active[0]);
|
||||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_VIEW);
|
gtk_style_context_lookup_color (context, "selected_fg_color", &priv->frame_color_active[1]);
|
||||||
gtk_widget_path_free (path);
|
|
||||||
|
|
||||||
gtk_style_context_get_background_color (context,
|
priv->frame_color[1] = priv->fg_color;
|
||||||
GTK_STATE_FLAG_NORMAL,
|
priv->bg_color = priv->frame_color[0];
|
||||||
&bg_color);
|
|
||||||
gtk_style_context_get_color (context,
|
|
||||||
GTK_STATE_FLAG_NORMAL,
|
|
||||||
&priv->fg_color);
|
|
||||||
|
|
||||||
gtk_style_context_get_background_color (context, GTK_STATE_FLAG_SELECTED,
|
if (priv->offscreen_window) gdk_window_set_background_rgba (priv->offscreen_window, &priv->bg_color);
|
||||||
&priv->frame_color[0]);
|
|
||||||
gtk_style_context_get_color (context, GTK_STATE_FLAG_SELECTED,
|
|
||||||
&priv->frame_color[1]);
|
|
||||||
|
|
||||||
gtk_style_context_get_background_color (context,
|
|
||||||
GTK_STATE_FLAG_SELECTED |
|
|
||||||
GTK_STATE_FLAG_FOCUSED,
|
|
||||||
&priv->frame_color_active[0]);
|
|
||||||
gtk_style_context_get_color (context,
|
|
||||||
GTK_STATE_FLAG_SELECTED |
|
|
||||||
GTK_STATE_FLAG_FOCUSED,
|
|
||||||
&priv->frame_color_active[1]);
|
|
||||||
|
|
||||||
gtk_widget_override_background_color (widget, GTK_STATE_FLAG_NORMAL, &bg_color);
|
|
||||||
|
|
||||||
g_object_unref (context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
glade_design_layout_init (GladeDesignLayout *layout)
|
glade_design_layout_init (GladeDesignLayout *layout)
|
||||||
{
|
{
|
||||||
GladeDesignLayoutPrivate *priv;
|
GladeDesignLayoutPrivate *priv;
|
||||||
|
GtkCssProvider *provider;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
layout->priv = priv = GLADE_DESIGN_LAYOUT_GET_PRIVATE (layout);
|
layout->priv = priv = GLADE_DESIGN_LAYOUT_GET_PRIVATE (layout);
|
||||||
@ -1796,6 +1752,16 @@ glade_design_layout_init (GladeDesignLayout *layout)
|
|||||||
priv->south.height = PADDING + OUTLINE_WIDTH;
|
priv->south.height = PADDING + OUTLINE_WIDTH;
|
||||||
|
|
||||||
gtk_widget_set_has_window (GTK_WIDGET (layout), TRUE);
|
gtk_widget_set_has_window (GTK_WIDGET (layout), TRUE);
|
||||||
|
|
||||||
|
provider = gtk_css_provider_new ();
|
||||||
|
gtk_css_provider_load_from_data (provider,
|
||||||
|
"GladeDesignLayout {\n"
|
||||||
|
" background-color : @base_color;\n"
|
||||||
|
" }", -1, NULL);
|
||||||
|
|
||||||
|
gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (layout)),
|
||||||
|
GTK_STYLE_PROVIDER (provider),
|
||||||
|
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1900,6 +1866,8 @@ glade_design_layout_constructor (GType type,
|
|||||||
G_CALLBACK (on_project_selection_changed),
|
G_CALLBACK (on_project_selection_changed),
|
||||||
GLADE_DESIGN_LAYOUT (object));
|
GLADE_DESIGN_LAYOUT (object));
|
||||||
|
|
||||||
|
glade_design_layout_style_updated (GTK_WIDGET (object));
|
||||||
|
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,7 +241,8 @@ glade_design_view_set_property (GObject *object,
|
|||||||
static void
|
static void
|
||||||
glade_design_view_get_property (GObject *object,
|
glade_design_view_get_property (GObject *object,
|
||||||
guint prop_id,
|
guint prop_id,
|
||||||
GValue *value, GParamSpec *pspec)
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
@ -291,30 +292,10 @@ glade_design_view_draw (GtkWidget *widget, cairo_t *cr)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
glade_design_view_style_updated (GtkWidget *widget)
|
|
||||||
{
|
|
||||||
GladeDesignViewPrivate *priv = GLADE_DESIGN_VIEW_GET_PRIVATE (widget);
|
|
||||||
GtkWidget *viewport = gtk_bin_get_child (GTK_BIN (priv->scrolled_window));
|
|
||||||
GtkStyleContext *context = gtk_style_context_new ();
|
|
||||||
GtkWidgetPath *path = gtk_widget_path_new ();
|
|
||||||
GdkRGBA bg_color;
|
|
||||||
|
|
||||||
g_type_class_ref (GTK_TYPE_TREE_VIEW);
|
|
||||||
gtk_widget_path_append_type (path, GTK_TYPE_WIDGET);
|
|
||||||
gtk_style_context_set_path (context, path);
|
|
||||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_VIEW);
|
|
||||||
gtk_widget_path_free (path);
|
|
||||||
|
|
||||||
gtk_style_context_get_background_color (context, GTK_STATE_FLAG_NORMAL, &bg_color);
|
|
||||||
gtk_widget_override_background_color (viewport, GTK_STATE_FLAG_NORMAL, &bg_color);
|
|
||||||
|
|
||||||
g_object_unref (context);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
glade_design_view_init (GladeDesignView *view)
|
glade_design_view_init (GladeDesignView *view)
|
||||||
{
|
{
|
||||||
|
GtkCssProvider *provider;
|
||||||
GtkWidget *viewport;
|
GtkWidget *viewport;
|
||||||
|
|
||||||
view->priv = GLADE_DESIGN_VIEW_GET_PRIVATE (view);
|
view->priv = GLADE_DESIGN_VIEW_GET_PRIVATE (view);
|
||||||
@ -322,7 +303,7 @@ glade_design_view_init (GladeDesignView *view)
|
|||||||
gtk_widget_set_no_show_all (GTK_WIDGET (view), TRUE);
|
gtk_widget_set_no_show_all (GTK_WIDGET (view), TRUE);
|
||||||
|
|
||||||
view->priv->project = NULL;
|
view->priv->project = NULL;
|
||||||
view->priv->layout_box = gtk_vbox_new (FALSE, 0);
|
view->priv->layout_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
gtk_widget_set_valign (view->priv->layout_box, GTK_ALIGN_START);
|
gtk_widget_set_valign (view->priv->layout_box, GTK_ALIGN_START);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (view->priv->layout_box), 0);
|
gtk_container_set_border_width (GTK_CONTAINER (view->priv->layout_box), 0);
|
||||||
gtk_box_pack_end (GTK_BOX (view->priv->layout_box), gtk_fixed_new (), FALSE, FALSE, 0);
|
gtk_box_pack_end (GTK_BOX (view->priv->layout_box), gtk_fixed_new (), FALSE, FALSE, 0);
|
||||||
@ -347,6 +328,16 @@ glade_design_view_init (GladeDesignView *view)
|
|||||||
gtk_box_pack_start (GTK_BOX (view), view->priv->scrolled_window, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (view), view->priv->scrolled_window, TRUE, TRUE, 0);
|
||||||
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (view), 0);
|
gtk_container_set_border_width (GTK_CONTAINER (view), 0);
|
||||||
|
|
||||||
|
provider = gtk_css_provider_new ();
|
||||||
|
gtk_css_provider_load_from_data (provider,
|
||||||
|
"GtkViewport {\n"
|
||||||
|
" background-color : @base_color;\n"
|
||||||
|
" }", -1, NULL);
|
||||||
|
|
||||||
|
gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (viewport)),
|
||||||
|
GTK_STYLE_PROVIDER (provider),
|
||||||
|
GTK_STYLE_PROVIDER_PRIORITY_FALLBACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -363,7 +354,6 @@ glade_design_view_class_init (GladeDesignViewClass *klass)
|
|||||||
object_class->set_property = glade_design_view_set_property;
|
object_class->set_property = glade_design_view_set_property;
|
||||||
|
|
||||||
widget_class->draw = glade_design_view_draw;
|
widget_class->draw = glade_design_view_draw;
|
||||||
widget_class->style_updated = glade_design_view_style_updated;
|
|
||||||
|
|
||||||
g_object_class_install_property (object_class,
|
g_object_class_install_property (object_class,
|
||||||
PROP_PROJECT,
|
PROP_PROJECT,
|
||||||
|
@ -342,7 +342,7 @@ glade_editor_property_constructor (GType type,
|
|||||||
|
|
||||||
g_object_ref_sink (eprop->priv->item_label);
|
g_object_ref_sink (eprop->priv->item_label);
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
|
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (eprop->priv->label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (eprop->priv->label), TRUE);
|
||||||
gtk_label_set_width_chars (GTK_LABEL (eprop->priv->label), 10);
|
gtk_label_set_width_chars (GTK_LABEL (eprop->priv->label), 10);
|
||||||
@ -1151,7 +1151,7 @@ glade_eprop_flags_show_dialog (GtkWidget * button, GladeEditorProperty * eprop)
|
|||||||
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
|
||||||
gtk_box_set_spacing (GTK_BOX (action_area), 6);
|
gtk_box_set_spacing (GTK_BOX (action_area), 6);
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 6);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||||
|
|
||||||
view = glade_eprop_flags_create_treeview (eprop);
|
view = glade_eprop_flags_create_treeview (eprop);
|
||||||
@ -1180,8 +1180,8 @@ glade_eprop_flags_create_input (GladeEditorProperty * eprop)
|
|||||||
GtkWidget *vbox, *hbox, *button, *widget;
|
GtkWidget *vbox, *hbox, *button, *widget;
|
||||||
GladeEPropFlags *eprop_flags = GLADE_EPROP_FLAGS (eprop);
|
GladeEPropFlags *eprop_flags = GLADE_EPROP_FLAGS (eprop);
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
vbox = gtk_vbox_new (FALSE, 0);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
|
|
||||||
widget = glade_eprop_flags_create_treeview (eprop);
|
widget = glade_eprop_flags_create_treeview (eprop);
|
||||||
|
|
||||||
@ -1321,7 +1321,7 @@ glade_eprop_color_create_input (GladeEditorProperty * eprop)
|
|||||||
|
|
||||||
pspec = glade_property_class_get_pspec (eprop->priv->klass);
|
pspec = glade_property_class_get_pspec (eprop->priv->klass);
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
|
|
||||||
eprop_color->entry = gtk_entry_new ();
|
eprop_color->entry = gtk_entry_new ();
|
||||||
gtk_editable_set_editable (GTK_EDITABLE (eprop_color->entry), FALSE);
|
gtk_editable_set_editable (GTK_EDITABLE (eprop_color->entry), FALSE);
|
||||||
@ -1525,7 +1525,7 @@ glade_eprop_named_icon_create_input (GladeEditorProperty * eprop)
|
|||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
|
|
||||||
eprop_named_icon->entry = gtk_entry_new ();
|
eprop_named_icon->entry = gtk_entry_new ();
|
||||||
gtk_widget_show (eprop_named_icon->entry);
|
gtk_widget_show (eprop_named_icon->entry);
|
||||||
@ -1786,7 +1786,7 @@ glade_editor_property_show_i18n_dialog (GtkWidget * parent,
|
|||||||
gtk_box_set_spacing (GTK_BOX (action_area), 6);
|
gtk_box_set_spacing (GTK_BOX (action_area), 6);
|
||||||
|
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 6);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
|
|
||||||
@ -1821,7 +1821,7 @@ glade_editor_property_show_i18n_dialog (GtkWidget * parent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Translatable and context prefix. */
|
/* Translatable and context prefix. */
|
||||||
hbox = gtk_hbox_new (FALSE, 12);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||||
@ -2128,7 +2128,7 @@ glade_eprop_text_create_input (GladeEditorProperty * eprop)
|
|||||||
klass = eprop->priv->klass;
|
klass = eprop->priv->klass;
|
||||||
pspec = glade_property_class_get_pspec (klass);
|
pspec = glade_property_class_get_pspec (klass);
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
|
|
||||||
if (glade_property_class_stock (klass) ||
|
if (glade_property_class_stock (klass) ||
|
||||||
glade_property_class_stock_icon (klass))
|
glade_property_class_stock_icon (klass))
|
||||||
@ -2809,7 +2809,7 @@ glade_editor_property_show_object_dialog (GladeProject * project,
|
|||||||
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
|
||||||
gtk_box_set_spacing (GTK_BOX (action_area), 6);
|
gtk_box_set_spacing (GTK_BOX (action_area), 6);
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 6);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||||
@ -2951,7 +2951,7 @@ glade_eprop_object_show_dialog (GtkWidget * dialog_button,
|
|||||||
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
|
||||||
gtk_box_set_spacing (GTK_BOX (action_area), 6);
|
gtk_box_set_spacing (GTK_BOX (action_area), 6);
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 6);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||||
@ -3134,7 +3134,7 @@ glade_eprop_object_create_input (GladeEditorProperty * eprop)
|
|||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
eprop_object->entry = gtk_entry_new ();
|
eprop_object->entry = gtk_entry_new ();
|
||||||
gtk_editable_set_editable (GTK_EDITABLE (eprop_object->entry), FALSE);
|
gtk_editable_set_editable (GTK_EDITABLE (eprop_object->entry), FALSE);
|
||||||
gtk_widget_show (eprop_object->entry);
|
gtk_widget_show (eprop_object->entry);
|
||||||
@ -3254,7 +3254,7 @@ glade_eprop_objects_show_dialog (GtkWidget * dialog_button,
|
|||||||
|
|
||||||
gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 500);
|
gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 500);
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 6);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
||||||
@ -3337,7 +3337,7 @@ glade_eprop_objects_create_input (GladeEditorProperty * eprop)
|
|||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
eprop_objects->entry = gtk_entry_new ();
|
eprop_objects->entry = gtk_entry_new ();
|
||||||
gtk_editable_set_editable (GTK_EDITABLE (eprop_objects->entry), FALSE);
|
gtk_editable_set_editable (GTK_EDITABLE (eprop_objects->entry), FALSE);
|
||||||
gtk_widget_show (eprop_objects->entry);
|
gtk_widget_show (eprop_objects->entry);
|
||||||
|
@ -289,7 +289,7 @@ glade_editor_notebook_page (GladeEditor * editor, const gchar * name)
|
|||||||
gtk_notebook_insert_page (GTK_NOTEBOOK (editor->priv->notebook), sw,
|
gtk_notebook_insert_page (GTK_NOTEBOOK (editor->priv->notebook), sw,
|
||||||
label_widget, page++);
|
label_widget, page++);
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 0);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
gtk_container_add (GTK_CONTAINER (alignment), vbox);
|
gtk_container_add (GTK_CONTAINER (alignment), vbox);
|
||||||
|
|
||||||
@ -419,7 +419,7 @@ glade_editor_setup_class_field (GladeEditor * editor)
|
|||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
gint icon_height;
|
gint icon_height;
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
|
|
||||||
editor->priv->class_icon = gtk_image_new ();
|
editor->priv->class_icon = gtk_image_new ();
|
||||||
editor->priv->class_label = gtk_label_new (NULL);
|
editor->priv->class_label = gtk_label_new (NULL);
|
||||||
@ -505,7 +505,7 @@ glade_editor_init (GladeEditor * editor)
|
|||||||
gtk_box_pack_start (GTK_BOX (editor), editor->priv->class_field, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (editor), editor->priv->class_field, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (editor), editor->priv->notebook, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (editor), editor->priv->notebook, TRUE, TRUE, 0);
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 6);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
|
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
|
||||||
gtk_box_pack_start (GTK_BOX (editor), hbox, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (editor), hbox, FALSE, FALSE, 0);
|
||||||
|
|
||||||
@ -1287,7 +1287,7 @@ glade_editor_reset_dialog (GladeEditor *editor)
|
|||||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||||
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
|
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 6);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
||||||
@ -1321,7 +1321,7 @@ glade_editor_reset_dialog (GladeEditor *editor)
|
|||||||
gtk_container_add (GTK_CONTAINER (sw), tree_view);
|
gtk_container_add (GTK_CONTAINER (sw), tree_view);
|
||||||
|
|
||||||
/* Select all / Unselect all */
|
/* Select all / Unselect all */
|
||||||
hbox = gtk_hbutton_box_new ();
|
hbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_END);
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (hbox), GTK_BUTTONBOX_END);
|
||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
|
||||||
|
@ -78,7 +78,6 @@ struct _GladeInspectorPrivate
|
|||||||
GladeProject *project;
|
GladeProject *project;
|
||||||
|
|
||||||
GtkWidget *entry;
|
GtkWidget *entry;
|
||||||
GCompletion *completion;
|
|
||||||
guint idle_complete;
|
guint idle_complete;
|
||||||
gboolean search_disabled;
|
gboolean search_disabled;
|
||||||
};
|
};
|
||||||
@ -122,7 +121,8 @@ G_DEFINE_TYPE (GladeInspector, glade_inspector, GTK_TYPE_VBOX)
|
|||||||
static void
|
static void
|
||||||
glade_inspector_get_property (GObject *object,
|
glade_inspector_get_property (GObject *object,
|
||||||
guint property_id,
|
guint property_id,
|
||||||
GValue * value, GParamSpec * pspec)
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
GladeInspector *inspector = GLADE_INSPECTOR (object);
|
GladeInspector *inspector = GLADE_INSPECTOR (object);
|
||||||
|
|
||||||
@ -205,7 +205,8 @@ find_in_string_insensitive (const gchar * _haystack, const gchar * _needle)
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
glade_inspector_visible_func (GtkTreeModel *model,
|
glade_inspector_visible_func (GtkTreeModel *model,
|
||||||
GtkTreeIter * parent, gpointer data)
|
GtkTreeIter *parent,
|
||||||
|
gpointer data)
|
||||||
{
|
{
|
||||||
GladeInspector *inspector = data;
|
GladeInspector *inspector = data;
|
||||||
GladeInspectorPrivate *priv = inspector->priv;
|
GladeInspectorPrivate *priv = inspector->priv;
|
||||||
@ -260,17 +261,44 @@ search_entry_changed_cb (GtkEntry * entry, GladeInspector * inspector)
|
|||||||
glade_inspector_filter (inspector);
|
glade_inspector_filter (inspector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
selection_name_foreach_func (GtkTreeModel *model,
|
||||||
|
GtkTreePath *path,
|
||||||
|
GtkTreeIter *iter,
|
||||||
|
gchar **selection)
|
||||||
|
{
|
||||||
|
if (*selection == NULL)
|
||||||
|
{
|
||||||
|
gchar *name;
|
||||||
|
|
||||||
|
gtk_tree_model_get (model, iter, GLADE_PROJECT_MODEL_COLUMN_NAME, &name, -1);
|
||||||
|
*selection = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static gchar *
|
||||||
|
get_selected_name (GladeInspector *inspector)
|
||||||
|
{
|
||||||
|
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (inspector->priv->view));
|
||||||
|
gchar *name = NULL;
|
||||||
|
|
||||||
|
gtk_tree_selection_selected_foreach (selection,
|
||||||
|
(GtkTreeSelectionForeachFunc)
|
||||||
|
selection_name_foreach_func, &name);
|
||||||
|
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
search_complete_idle (GladeInspector *inspector)
|
search_complete_idle (GladeInspector *inspector)
|
||||||
{
|
{
|
||||||
GladeInspectorPrivate *priv = inspector->priv;
|
GladeInspectorPrivate *priv = inspector->priv;
|
||||||
|
gchar *completed = get_selected_name (inspector);
|
||||||
const gchar *str;
|
const gchar *str;
|
||||||
gchar *completed = NULL;
|
|
||||||
gsize length;
|
gsize length;
|
||||||
|
|
||||||
str = gtk_entry_get_text (GTK_ENTRY (priv->entry));
|
str = gtk_entry_get_text (GTK_ENTRY (priv->entry));
|
||||||
|
|
||||||
g_completion_complete (priv->completion, str, &completed);
|
|
||||||
if (completed)
|
if (completed)
|
||||||
{
|
{
|
||||||
length = strlen (str);
|
length = strlen (str);
|
||||||
@ -290,7 +318,8 @@ static void
|
|||||||
search_entry_text_inserted_cb (GtkEntry *entry,
|
search_entry_text_inserted_cb (GtkEntry *entry,
|
||||||
const gchar *text,
|
const gchar *text,
|
||||||
gint length,
|
gint length,
|
||||||
gint * position, GladeInspector * inspector)
|
gint *position,
|
||||||
|
GladeInspector *inspector)
|
||||||
{
|
{
|
||||||
GladeInspectorPrivate *priv = inspector->priv;
|
GladeInspectorPrivate *priv = inspector->priv;
|
||||||
|
|
||||||
@ -325,18 +354,14 @@ search_entry_key_press_event_cb (GtkEntry * entry,
|
|||||||
|
|
||||||
if (event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_KP_Enter)
|
if (event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_KP_Enter)
|
||||||
{
|
{
|
||||||
GladeWidget *widget;
|
gchar *name;
|
||||||
GList *list;
|
|
||||||
|
|
||||||
str = gtk_entry_get_text (GTK_ENTRY (priv->entry));
|
str = gtk_entry_get_text (GTK_ENTRY (priv->entry));
|
||||||
|
|
||||||
if (str &&
|
if (str && (name = get_selected_name (inspector)))
|
||||||
(list = g_completion_complete (priv->completion, str, NULL)) != NULL)
|
|
||||||
{
|
{
|
||||||
widget = glade_widget_get_from_gobject (list->data);
|
gtk_entry_set_text (GTK_ENTRY (entry), name);
|
||||||
|
g_free (name);
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), glade_widget_get_name (widget));
|
|
||||||
|
|
||||||
gtk_editable_set_position (GTK_EDITABLE (entry), -1);
|
gtk_editable_set_position (GTK_EDITABLE (entry), -1);
|
||||||
gtk_editable_select_region (GTK_EDITABLE (entry), -1, -1);
|
gtk_editable_select_region (GTK_EDITABLE (entry), -1, -1);
|
||||||
}
|
}
|
||||||
@ -358,14 +383,6 @@ widget_font_desc_set_style (GtkWidget * widget, PangoStyle style)
|
|||||||
pango_font_description_free (font_desc);
|
pango_font_description_free (font_desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const gchar *
|
|
||||||
search_complete_func (GObject * object)
|
|
||||||
{
|
|
||||||
GladeWidget *widget = glade_widget_get_from_gobject (object);
|
|
||||||
g_assert (widget);
|
|
||||||
return glade_widget_get_name (widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
search_entry_update (GladeInspector *inspector)
|
search_entry_update (GladeInspector *inspector)
|
||||||
{
|
{
|
||||||
@ -389,7 +406,8 @@ search_entry_update (GladeInspector * inspector)
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
search_entry_focus_in_cb (GtkWidget *entry,
|
search_entry_focus_in_cb (GtkWidget *entry,
|
||||||
GdkEventFocus * event, GladeInspector * inspector)
|
GdkEventFocus *event,
|
||||||
|
GladeInspector *inspector)
|
||||||
{
|
{
|
||||||
GladeInspectorPrivate *priv = inspector->priv;
|
GladeInspectorPrivate *priv = inspector->priv;
|
||||||
|
|
||||||
@ -407,7 +425,8 @@ search_entry_focus_in_cb (GtkWidget * entry,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
search_entry_focus_out_cb (GtkWidget *entry,
|
search_entry_focus_out_cb (GtkWidget *entry,
|
||||||
GdkEventFocus * event, GladeInspector * inspector)
|
GdkEventFocus *event,
|
||||||
|
GladeInspector *inspector)
|
||||||
{
|
{
|
||||||
search_entry_update (inspector);
|
search_entry_update (inspector);
|
||||||
|
|
||||||
@ -435,27 +454,19 @@ glade_inspector_init (GladeInspector * inspector)
|
|||||||
|
|
||||||
g_signal_connect (priv->entry, "changed",
|
g_signal_connect (priv->entry, "changed",
|
||||||
G_CALLBACK (search_entry_changed_cb), inspector);
|
G_CALLBACK (search_entry_changed_cb), inspector);
|
||||||
|
|
||||||
g_signal_connect (priv->entry, "key-press-event",
|
g_signal_connect (priv->entry, "key-press-event",
|
||||||
G_CALLBACK (search_entry_key_press_event_cb), inspector);
|
G_CALLBACK (search_entry_key_press_event_cb), inspector);
|
||||||
|
|
||||||
g_signal_connect_after (priv->entry, "insert-text",
|
g_signal_connect_after (priv->entry, "insert-text",
|
||||||
G_CALLBACK (search_entry_text_inserted_cb),
|
G_CALLBACK (search_entry_text_inserted_cb),
|
||||||
inspector);
|
inspector);
|
||||||
|
|
||||||
g_signal_connect (priv->entry, "focus-in-event",
|
g_signal_connect (priv->entry, "focus-in-event",
|
||||||
G_CALLBACK (search_entry_focus_in_cb), inspector);
|
G_CALLBACK (search_entry_focus_in_cb), inspector);
|
||||||
|
|
||||||
g_signal_connect (priv->entry, "focus-out-event",
|
g_signal_connect (priv->entry, "focus-out-event",
|
||||||
G_CALLBACK (search_entry_focus_out_cb), inspector);
|
G_CALLBACK (search_entry_focus_out_cb), inspector);
|
||||||
|
|
||||||
priv->completion = g_completion_new ((GCompletionFunc) search_complete_func);
|
|
||||||
|
|
||||||
priv->view = gtk_tree_view_new ();
|
priv->view = gtk_tree_view_new ();
|
||||||
gtk_tree_view_set_enable_search (GTK_TREE_VIEW (priv->view), FALSE);
|
|
||||||
|
|
||||||
|
|
||||||
add_columns (GTK_TREE_VIEW (priv->view));
|
add_columns (GTK_TREE_VIEW (priv->view));
|
||||||
|
gtk_tree_view_set_search_column (GTK_TREE_VIEW (priv->view), GLADE_PROJECT_MODEL_COLUMN_NAME);
|
||||||
|
|
||||||
g_signal_connect (G_OBJECT (priv->view), "row-activated",
|
g_signal_connect (G_OBJECT (priv->view), "row-activated",
|
||||||
G_CALLBACK (item_activated_cb), inspector);
|
G_CALLBACK (item_activated_cb), inspector);
|
||||||
@ -469,7 +480,6 @@ glade_inspector_init (GladeInspector * inspector)
|
|||||||
g_signal_connect (G_OBJECT (priv->view), "button-press-event",
|
g_signal_connect (G_OBJECT (priv->view), "button-press-event",
|
||||||
G_CALLBACK (button_press_cb), inspector);
|
G_CALLBACK (button_press_cb), inspector);
|
||||||
|
|
||||||
|
|
||||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||||
@ -480,12 +490,9 @@ glade_inspector_init (GladeInspector * inspector)
|
|||||||
gtk_widget_show (priv->view);
|
gtk_widget_show (priv->view);
|
||||||
gtk_widget_show (sw);
|
gtk_widget_show (sw);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gtk_widget_pop_composite_child ();
|
gtk_widget_pop_composite_child ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
glade_inspector_dispose (GObject *object)
|
glade_inspector_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
@ -505,10 +512,6 @@ glade_inspector_dispose (GObject * object)
|
|||||||
static void
|
static void
|
||||||
glade_inspector_finalize (GObject *object)
|
glade_inspector_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GladeInspector *inspector = GLADE_INSPECTOR (object);
|
|
||||||
|
|
||||||
g_completion_free (inspector->priv->completion);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (glade_inspector_parent_class)->finalize (object);
|
G_OBJECT_CLASS (glade_inspector_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -581,7 +584,8 @@ project_selection_changed_cb (GladeProject * project,
|
|||||||
static void
|
static void
|
||||||
selection_foreach_func (GtkTreeModel *model,
|
selection_foreach_func (GtkTreeModel *model,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeIter * iter, GList ** selection)
|
GtkTreeIter *iter,
|
||||||
|
GList **selection)
|
||||||
{
|
{
|
||||||
GObject *object;
|
GObject *object;
|
||||||
|
|
||||||
@ -636,14 +640,16 @@ selection_changed_cb (GtkTreeSelection * selection, GladeInspector * inspector)
|
|||||||
static void
|
static void
|
||||||
item_activated_cb (GtkTreeView *view,
|
item_activated_cb (GtkTreeView *view,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeViewColumn * column, GladeInspector * inspector)
|
GtkTreeViewColumn *column,
|
||||||
|
GladeInspector *inspector)
|
||||||
{
|
{
|
||||||
g_signal_emit (inspector, glade_inspector_signals[ITEM_ACTIVATED], 0);
|
g_signal_emit (inspector, glade_inspector_signals[ITEM_ACTIVATED], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
button_press_cb (GtkWidget *widget,
|
button_press_cb (GtkWidget *widget,
|
||||||
GdkEventButton * event, GladeInspector * inspector)
|
GdkEventButton *event,
|
||||||
|
GladeInspector *inspector)
|
||||||
{
|
{
|
||||||
GtkTreeView *view = GTK_TREE_VIEW (widget);
|
GtkTreeView *view = GTK_TREE_VIEW (widget);
|
||||||
GladeInspectorPrivate *priv = inspector->priv;
|
GladeInspectorPrivate *priv = inspector->priv;
|
||||||
@ -735,36 +741,9 @@ add_columns (GtkTreeView * view)
|
|||||||
gtk_tree_view_set_headers_visible (view, FALSE);
|
gtk_tree_view_set_headers_visible (view, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
update_project_completion (GladeProject * project,
|
|
||||||
GladeWidget * widget, GladeInspector * inspector)
|
|
||||||
{
|
|
||||||
GladeInspectorPrivate *priv = inspector->priv;
|
|
||||||
const GList *items;
|
|
||||||
|
|
||||||
g_completion_clear_items (priv->completion);
|
|
||||||
|
|
||||||
if (!priv->project)
|
|
||||||
return;
|
|
||||||
|
|
||||||
items = glade_project_get_objects (priv->project);
|
|
||||||
|
|
||||||
/* GCompletion API should take 'const GList *' */
|
|
||||||
g_completion_add_items (priv->completion, (GList *) items);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
disconnect_project_signals (GladeInspector *inspector, GladeProject *project)
|
disconnect_project_signals (GladeInspector *inspector, GladeProject *project)
|
||||||
{
|
{
|
||||||
g_signal_handlers_disconnect_by_func (G_OBJECT (project),
|
|
||||||
G_CALLBACK (update_project_completion),
|
|
||||||
inspector);
|
|
||||||
g_signal_handlers_disconnect_by_func (G_OBJECT (project),
|
|
||||||
G_CALLBACK (update_project_completion),
|
|
||||||
inspector);
|
|
||||||
g_signal_handlers_disconnect_by_func (G_OBJECT (project),
|
|
||||||
G_CALLBACK (update_project_completion),
|
|
||||||
inspector);
|
|
||||||
g_signal_handlers_disconnect_by_func (G_OBJECT (project),
|
g_signal_handlers_disconnect_by_func (G_OBJECT (project),
|
||||||
G_CALLBACK
|
G_CALLBACK
|
||||||
(project_selection_changed_cb),
|
(project_selection_changed_cb),
|
||||||
@ -774,12 +753,6 @@ disconnect_project_signals (GladeInspector * inspector, GladeProject * project)
|
|||||||
static void
|
static void
|
||||||
connect_project_signals (GladeInspector *inspector, GladeProject *project)
|
connect_project_signals (GladeInspector *inspector, GladeProject *project)
|
||||||
{
|
{
|
||||||
g_signal_connect (G_OBJECT (project), "add-widget",
|
|
||||||
G_CALLBACK (update_project_completion), inspector);
|
|
||||||
g_signal_connect (G_OBJECT (project), "remove-widget",
|
|
||||||
G_CALLBACK (update_project_completion), inspector);
|
|
||||||
g_signal_connect (G_OBJECT (project), "widget-name-changed",
|
|
||||||
G_CALLBACK (update_project_completion), inspector);
|
|
||||||
g_signal_connect (G_OBJECT (project), "selection-changed",
|
g_signal_connect (G_OBJECT (project), "selection-changed",
|
||||||
G_CALLBACK (project_selection_changed_cb), inspector);
|
G_CALLBACK (project_selection_changed_cb), inspector);
|
||||||
}
|
}
|
||||||
@ -828,9 +801,15 @@ glade_inspector_set_project (GladeInspector * inspector, GladeProject * project)
|
|||||||
g_object_unref (priv->filter); /* pass ownership of the filter to the model */
|
g_object_unref (priv->filter); /* pass ownership of the filter to the model */
|
||||||
|
|
||||||
connect_project_signals (inspector, project);
|
connect_project_signals (inspector, project);
|
||||||
}
|
|
||||||
|
|
||||||
update_project_completion (project, NULL, inspector);
|
gtk_tree_view_set_search_entry (GTK_TREE_VIEW (priv->view), GTK_ENTRY (priv->entry));
|
||||||
|
gtk_tree_view_set_enable_search (GTK_TREE_VIEW (priv->view), TRUE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gtk_tree_view_set_search_entry (GTK_TREE_VIEW (priv->view), NULL);
|
||||||
|
gtk_tree_view_set_enable_search (GTK_TREE_VIEW (priv->view), FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
g_object_notify_by_pspec (G_OBJECT (inspector), properties[PROP_PROJECT]);
|
g_object_notify_by_pspec (G_OBJECT (inspector), properties[PROP_PROJECT]);
|
||||||
}
|
}
|
||||||
|
@ -22,3 +22,4 @@ BOOLEAN:STRING,STRING,STRING,BOXED
|
|||||||
BOOLEAN:STRING,BOXED,OBJECT
|
BOOLEAN:STRING,BOXED,OBJECT
|
||||||
STRING:OBJECT
|
STRING:OBJECT
|
||||||
INT:OBJECT,BOXED
|
INT:OBJECT,BOXED
|
||||||
|
BOXED:OBJECT
|
||||||
|
@ -463,7 +463,7 @@ set_busy_cursor (GladeNamedIconChooserDialog * dialog, gboolean busy)
|
|||||||
gdk_display_flush (display);
|
gdk_display_flush (display);
|
||||||
|
|
||||||
if (cursor)
|
if (cursor)
|
||||||
gdk_cursor_unref (cursor);
|
g_object_unref (cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkListStore *
|
static GtkListStore *
|
||||||
@ -1407,7 +1407,7 @@ glade_named_icon_chooser_dialog_init (GladeNamedIconChooserDialog * dialog)
|
|||||||
|
|
||||||
gtk_widget_push_composite_child ();
|
gtk_widget_push_composite_child ();
|
||||||
|
|
||||||
contents = gtk_vbox_new (FALSE, 6);
|
contents = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
gtk_widget_show (contents);
|
gtk_widget_show (contents);
|
||||||
|
|
||||||
label = gtk_label_new_with_mnemonic (_("Icon _Name:"));
|
label = gtk_label_new_with_mnemonic (_("Icon _Name:"));
|
||||||
@ -1435,21 +1435,21 @@ glade_named_icon_chooser_dialog_init (GladeNamedIconChooserDialog * dialog)
|
|||||||
|
|
||||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->priv->entry);
|
gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->priv->entry);
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 12);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
||||||
gtk_widget_show (hbox);
|
gtk_widget_show (hbox);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), dialog->priv->entry, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (hbox), dialog->priv->entry, TRUE, TRUE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (contents), hbox, FALSE, FALSE, 6);
|
gtk_box_pack_start (GTK_BOX (contents), hbox, FALSE, FALSE, 6);
|
||||||
|
|
||||||
hpaned = gtk_hpaned_new ();
|
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
gtk_paned_set_position (GTK_PANED (hpaned), 150);
|
gtk_paned_set_position (GTK_PANED (hpaned), 150);
|
||||||
gtk_widget_show (hpaned);
|
gtk_widget_show (hpaned);
|
||||||
|
|
||||||
dialog->priv->contexts_view = create_contexts_view (dialog);
|
dialog->priv->contexts_view = create_contexts_view (dialog);
|
||||||
dialog->priv->icons_view = create_icons_view (dialog);
|
dialog->priv->icons_view = create_icons_view (dialog);
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 6);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
|
|
||||||
group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
|
group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
|
||||||
@ -1474,7 +1474,7 @@ glade_named_icon_chooser_dialog_init (GladeNamedIconChooserDialog * dialog)
|
|||||||
gtk_paned_pack1 (GTK_PANED (hpaned), vbox, FALSE, FALSE);
|
gtk_paned_pack1 (GTK_PANED (hpaned), vbox, FALSE, FALSE);
|
||||||
|
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 6);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
|
|
||||||
label = gtk_label_new_with_mnemonic (_("Icon Na_mes:"));
|
label = gtk_label_new_with_mnemonic (_("Icon Na_mes:"));
|
||||||
|
@ -304,7 +304,7 @@ glade_palette_new_item (GladePalette * palette, GladeWidgetAdaptor * adaptor)
|
|||||||
g_assert (GTK_IS_BUTTON (button));
|
g_assert (GTK_IS_BUTTON (button));
|
||||||
|
|
||||||
/* Add a box to avoid the ellipsize on the items */
|
/* Add a box to avoid the ellipsize on the items */
|
||||||
box = gtk_hbox_new (FALSE, 0);
|
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
label = gtk_label_new (glade_widget_adaptor_get_title (adaptor));
|
label = gtk_label_new (glade_widget_adaptor_get_title (adaptor));
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
@ -636,7 +636,7 @@ glade_palette_init (GladePalette * palette)
|
|||||||
|
|
||||||
/* create selector button */
|
/* create selector button */
|
||||||
priv->selector_button = glade_palette_create_selector_button (palette);
|
priv->selector_button = glade_palette_create_selector_button (palette);
|
||||||
priv->selector_hbox = gtk_hbox_new (FALSE, 0);
|
priv->selector_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (priv->selector_hbox), priv->selector_button,
|
gtk_box_pack_start (GTK_BOX (priv->selector_hbox), priv->selector_button,
|
||||||
FALSE, FALSE, 0);
|
FALSE, FALSE, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (palette), priv->selector_hbox, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (palette), priv->selector_hbox, FALSE, FALSE, 0);
|
||||||
|
@ -58,36 +58,30 @@ glade_popup_select_cb (GtkMenuItem * item, GladeWidget * widget)
|
|||||||
glade_widget_get_object (widget), TRUE);
|
glade_widget_get_object (widget), TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
glade_popup_widget_add_cb (GtkMenuItem * item,
|
|
||||||
GladeWidget * widget)
|
|
||||||
{
|
|
||||||
GladeProject *project;
|
|
||||||
GladeWidgetAdaptor *adaptor;
|
|
||||||
|
|
||||||
project = glade_widget_get_project (widget);
|
|
||||||
adaptor = glade_project_get_add_item (project);
|
|
||||||
|
|
||||||
g_return_if_fail (adaptor != NULL);
|
|
||||||
|
|
||||||
if (!glade_util_check_and_warn_scrollable
|
|
||||||
(widget, adaptor, glade_app_get_window ()))
|
|
||||||
{
|
|
||||||
if (glade_command_create (adaptor, widget,
|
|
||||||
NULL, project))
|
|
||||||
|
|
||||||
glade_project_set_add_item (project, NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
GladeWidgetAdaptor *adaptor;
|
GladeWidgetAdaptor *adaptor;
|
||||||
GladeProject *project;
|
GladeProject *project;
|
||||||
|
GladeWidget *parent;
|
||||||
|
GladePlaceholder *placeholder;
|
||||||
} RootAddData;
|
} RootAddData;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
glade_popup_root_add_cb (GtkMenuItem *item,
|
glade_popup_widget_add_cb (GtkMenuItem *item, RootAddData *data)
|
||||||
RootAddData *data)
|
{
|
||||||
|
g_return_if_fail (data->adaptor != NULL);
|
||||||
|
|
||||||
|
if (!glade_util_check_and_warn_scrollable
|
||||||
|
(data->parent, data->adaptor, glade_app_get_window ()))
|
||||||
|
{
|
||||||
|
if (glade_command_create (data->adaptor, data->parent,
|
||||||
|
data->placeholder, data->project))
|
||||||
|
|
||||||
|
glade_project_set_add_item (data->project, NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_popup_root_add_cb (GtkMenuItem *item, RootAddData *data)
|
||||||
{
|
{
|
||||||
glade_command_create (data->adaptor, NULL, NULL, data->project);
|
glade_command_create (data->adaptor, NULL, NULL, data->project);
|
||||||
}
|
}
|
||||||
@ -179,7 +173,9 @@ glade_popup_append_item (GtkWidget * popup_menu,
|
|||||||
const gchar *stock_id,
|
const gchar *stock_id,
|
||||||
const gchar *label,
|
const gchar *label,
|
||||||
GtkWidget *image,
|
GtkWidget *image,
|
||||||
gboolean sensitive, gpointer callback, gpointer data)
|
gboolean sensitive,
|
||||||
|
gpointer callback,
|
||||||
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *menu_item;
|
GtkWidget *menu_item;
|
||||||
|
|
||||||
@ -257,7 +253,8 @@ static gint
|
|||||||
glade_popup_action_populate_menu_real (GtkWidget *menu,
|
glade_popup_action_populate_menu_real (GtkWidget *menu,
|
||||||
GladeWidget *gwidget,
|
GladeWidget *gwidget,
|
||||||
GList *actions,
|
GList *actions,
|
||||||
GCallback callback, gpointer data)
|
GCallback callback,
|
||||||
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *item;
|
GtkWidget *item;
|
||||||
GList *list;
|
GList *list;
|
||||||
@ -320,7 +317,8 @@ glade_popup_action_populate_menu_real (GtkWidget * menu,
|
|||||||
gint
|
gint
|
||||||
glade_popup_action_populate_menu (GtkWidget *menu,
|
glade_popup_action_populate_menu (GtkWidget *menu,
|
||||||
GladeWidget *widget,
|
GladeWidget *widget,
|
||||||
GladeWidgetAction * action, gboolean packing)
|
GladeWidgetAction *action,
|
||||||
|
gboolean packing)
|
||||||
{
|
{
|
||||||
gint n;
|
gint n;
|
||||||
|
|
||||||
@ -398,20 +396,20 @@ glade_popup_create_menu (GladeWidget *widget,
|
|||||||
|
|
||||||
if (adaptor)
|
if (adaptor)
|
||||||
{
|
{
|
||||||
GladeWidget *parent;
|
|
||||||
RootAddData *data = g_new (RootAddData, 1);
|
RootAddData *data = g_new (RootAddData, 1);
|
||||||
|
|
||||||
parent = placeholder ? glade_placeholder_get_parent (placeholder) : widget;
|
|
||||||
|
|
||||||
data->adaptor = adaptor;
|
data->adaptor = adaptor;
|
||||||
data->project = project;
|
data->project = project;
|
||||||
|
data->parent = placeholder ? glade_placeholder_get_parent (placeholder) : widget;
|
||||||
|
data->placeholder = placeholder;
|
||||||
|
|
||||||
g_object_set_data_full (G_OBJECT (popup_menu), "root-data-destroy-me",
|
g_object_set_data_full (G_OBJECT (popup_menu), "root-data-destroy-me",
|
||||||
data, (GDestroyNotify)g_free);
|
data, (GDestroyNotify)g_free);
|
||||||
|
|
||||||
glade_popup_append_item (popup_menu, NULL, _("_Add widget here"),
|
glade_popup_append_item (popup_menu, NULL, _("_Add widget here"),
|
||||||
NULL, parent != NULL,
|
NULL, data->parent != NULL,
|
||||||
glade_popup_widget_add_cb,
|
glade_popup_widget_add_cb,
|
||||||
parent);
|
data);
|
||||||
|
|
||||||
glade_popup_append_item (popup_menu, NULL, _("Add widget as _toplevel"),
|
glade_popup_append_item (popup_menu, NULL, _("Add widget as _toplevel"),
|
||||||
NULL, TRUE, glade_popup_root_add_cb, data);
|
NULL, TRUE, glade_popup_root_add_cb, data);
|
||||||
@ -510,7 +508,8 @@ glade_popup_create_menu (GladeWidget *widget,
|
|||||||
|
|
||||||
void
|
void
|
||||||
glade_popup_widget_pop (GladeWidget *widget,
|
glade_popup_widget_pop (GladeWidget *widget,
|
||||||
GdkEventButton * event, gboolean packing)
|
GdkEventButton *event,
|
||||||
|
gboolean packing)
|
||||||
{
|
{
|
||||||
GtkWidget *popup_menu;
|
GtkWidget *popup_menu;
|
||||||
gint button;
|
gint button;
|
||||||
@ -700,8 +699,7 @@ glade_popup_property_pop (GladeProperty * property, GdkEventButton * event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
glade_popup_simple_pop (GladeProject *project,
|
glade_popup_simple_pop (GladeProject *project, GdkEventButton *event)
|
||||||
GdkEventButton *event)
|
|
||||||
{
|
{
|
||||||
GtkWidget *popup_menu;
|
GtkWidget *popup_menu;
|
||||||
gint button;
|
gint button;
|
||||||
|
@ -4083,7 +4083,7 @@ glade_project_build_prefs_box (GladeProject *project)
|
|||||||
main_frame = gtk_frame_new (NULL);
|
main_frame = gtk_frame_new (NULL);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (main_frame), GTK_SHADOW_NONE);
|
gtk_frame_set_shadow_type (GTK_FRAME (main_frame), GTK_SHADOW_NONE);
|
||||||
main_alignment = gtk_alignment_new (0.5F, 0.5F, 0.8F, 0.8F);
|
main_alignment = gtk_alignment_new (0.5F, 0.5F, 0.8F, 0.8F);
|
||||||
main_box = gtk_vbox_new (FALSE, 0);
|
main_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
|
|
||||||
gtk_alignment_set_padding (GTK_ALIGNMENT (main_alignment), 0, 0, 4, 0);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (main_alignment), 0, 0, 4, 0);
|
||||||
|
|
||||||
@ -4094,7 +4094,7 @@ glade_project_build_prefs_box (GladeProject *project)
|
|||||||
string =
|
string =
|
||||||
g_strdup_printf ("<b>%s</b>", _("Image resources are loaded locally:"));
|
g_strdup_printf ("<b>%s</b>", _("Image resources are loaded locally:"));
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
vbox = gtk_vbox_new (FALSE, 0);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
alignment = gtk_alignment_new (0.5F, 0.5F, 0.8F, 0.8F);
|
alignment = gtk_alignment_new (0.5F, 0.5F, 0.8F, 0.8F);
|
||||||
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 8, 0, 12, 0);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 8, 0, 12, 0);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
|
||||||
@ -4115,7 +4115,7 @@ glade_project_build_prefs_box (GladeProject *project)
|
|||||||
gtk_size_group_add_widget (sizegroup, project->priv->resource_default_radio);
|
gtk_size_group_add_widget (sizegroup, project->priv->resource_default_radio);
|
||||||
|
|
||||||
/* Project relative directory... */
|
/* Project relative directory... */
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
project->priv->resource_relative_radio =
|
project->priv->resource_relative_radio =
|
||||||
gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON
|
gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON
|
||||||
(project->priv->
|
(project->priv->
|
||||||
@ -4132,7 +4132,7 @@ glade_project_build_prefs_box (GladeProject *project)
|
|||||||
|
|
||||||
|
|
||||||
/* fullpath directory... */
|
/* fullpath directory... */
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
project->priv->resource_fullpath_radio =
|
project->priv->resource_fullpath_radio =
|
||||||
gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON
|
gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON
|
||||||
(project->priv->resource_default_radio),
|
(project->priv->resource_default_radio),
|
||||||
@ -4168,7 +4168,7 @@ glade_project_build_prefs_box (GladeProject *project)
|
|||||||
/* Target versions */
|
/* Target versions */
|
||||||
string = g_strdup_printf ("<b>%s</b>", _("Toolkit versions required:"));
|
string = g_strdup_printf ("<b>%s</b>", _("Toolkit versions required:"));
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
vbox = gtk_vbox_new (FALSE, 0);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
alignment = gtk_alignment_new (0.5F, 0.5F, 1.0F, 1.0F);
|
alignment = gtk_alignment_new (0.5F, 0.5F, 1.0F, 1.0F);
|
||||||
|
|
||||||
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 8, 0, 12, 0);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 8, 0, 12, 0);
|
||||||
@ -4207,7 +4207,7 @@ glade_project_build_prefs_box (GladeProject *project)
|
|||||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0F, 0.5F);
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0F, 0.5F);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
|
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
|
|
||||||
active_radio = NULL;
|
active_radio = NULL;
|
||||||
target_radio = NULL;
|
target_radio = NULL;
|
||||||
@ -4257,7 +4257,7 @@ glade_project_build_prefs_box (GladeProject *project)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Run verify */
|
/* Run verify */
|
||||||
hbox = gtk_hbox_new (FALSE, 2);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||||
button = gtk_button_new_from_stock (GTK_STOCK_EXECUTE);
|
button = gtk_button_new_from_stock (GTK_STOCK_EXECUTE);
|
||||||
g_signal_connect (G_OBJECT (button), "clicked",
|
g_signal_connect (G_OBJECT (button), "clicked",
|
||||||
G_CALLBACK (verify_clicked), project);
|
G_CALLBACK (verify_clicked), project);
|
||||||
|
@ -544,7 +544,7 @@ glade_property_class_make_string_from_gvalue (GladePropertyClass *
|
|||||||
string = g_value_dup_string (value);
|
string = g_value_dup_string (value);
|
||||||
}
|
}
|
||||||
else if (G_IS_PARAM_SPEC_CHAR (property_class->pspec))
|
else if (G_IS_PARAM_SPEC_CHAR (property_class->pspec))
|
||||||
string = g_strdup_printf ("%c", g_value_get_char (value));
|
string = g_strdup_printf ("%c", g_value_get_schar (value));
|
||||||
else if (G_IS_PARAM_SPEC_UCHAR (property_class->pspec))
|
else if (G_IS_PARAM_SPEC_UCHAR (property_class->pspec))
|
||||||
string = g_strdup_printf ("%c", g_value_get_uchar (value));
|
string = g_strdup_printf ("%c", g_value_get_uchar (value));
|
||||||
else if (G_IS_PARAM_SPEC_UNICHAR (property_class->pspec))
|
else if (G_IS_PARAM_SPEC_UNICHAR (property_class->pspec))
|
||||||
@ -859,7 +859,7 @@ glade_property_class_make_gvalue_from_string (GladePropertyClass *property_class
|
|||||||
else if (G_IS_PARAM_SPEC_STRING (property_class->pspec))
|
else if (G_IS_PARAM_SPEC_STRING (property_class->pspec))
|
||||||
g_value_set_string (value, string);
|
g_value_set_string (value, string);
|
||||||
else if (G_IS_PARAM_SPEC_CHAR (property_class->pspec))
|
else if (G_IS_PARAM_SPEC_CHAR (property_class->pspec))
|
||||||
g_value_set_char (value, string[0]);
|
g_value_set_schar (value, string[0]);
|
||||||
else if (G_IS_PARAM_SPEC_UCHAR (property_class->pspec))
|
else if (G_IS_PARAM_SPEC_UCHAR (property_class->pspec))
|
||||||
g_value_set_uchar (value, string[0]);
|
g_value_set_uchar (value, string[0]);
|
||||||
else if (G_IS_PARAM_SPEC_UNICHAR (property_class->pspec))
|
else if (G_IS_PARAM_SPEC_UNICHAR (property_class->pspec))
|
||||||
@ -933,7 +933,7 @@ glade_property_class_make_gvalue_from_vl (GladePropertyClass * klass,
|
|||||||
else if (G_IS_PARAM_SPEC_STRING (klass->pspec))
|
else if (G_IS_PARAM_SPEC_STRING (klass->pspec))
|
||||||
g_value_set_string (value, va_arg (vl, gchar *));
|
g_value_set_string (value, va_arg (vl, gchar *));
|
||||||
else if (G_IS_PARAM_SPEC_CHAR (klass->pspec))
|
else if (G_IS_PARAM_SPEC_CHAR (klass->pspec))
|
||||||
g_value_set_char (value, (gchar) va_arg (vl, gint));
|
g_value_set_schar (value, (gchar) va_arg (vl, gint));
|
||||||
else if (G_IS_PARAM_SPEC_UCHAR (klass->pspec))
|
else if (G_IS_PARAM_SPEC_UCHAR (klass->pspec))
|
||||||
g_value_set_uchar (value, (guchar) va_arg (vl, guint));
|
g_value_set_uchar (value, (guchar) va_arg (vl, guint));
|
||||||
else if (G_IS_PARAM_SPEC_UNICHAR (klass->pspec))
|
else if (G_IS_PARAM_SPEC_UNICHAR (klass->pspec))
|
||||||
@ -1018,7 +1018,7 @@ glade_property_class_set_vl_from_gvalue (GladePropertyClass * klass,
|
|||||||
else if (G_IS_PARAM_SPEC_STRING (klass->pspec))
|
else if (G_IS_PARAM_SPEC_STRING (klass->pspec))
|
||||||
*(gchar **) (va_arg (vl, gchar *)) = (gchar *) g_value_get_string (value);
|
*(gchar **) (va_arg (vl, gchar *)) = (gchar *) g_value_get_string (value);
|
||||||
else if (G_IS_PARAM_SPEC_CHAR (klass->pspec))
|
else if (G_IS_PARAM_SPEC_CHAR (klass->pspec))
|
||||||
*(gchar *) (va_arg (vl, gint *)) = g_value_get_char (value);
|
*(gchar *) (va_arg (vl, gint *)) = g_value_get_schar (value);
|
||||||
else if (G_IS_PARAM_SPEC_UCHAR (klass->pspec))
|
else if (G_IS_PARAM_SPEC_UCHAR (klass->pspec))
|
||||||
*(guchar *) (va_arg (vl, guint *)) = g_value_get_uchar (value);
|
*(guchar *) (va_arg (vl, guint *)) = g_value_get_uchar (value);
|
||||||
else if (G_IS_PARAM_SPEC_UNICHAR (klass->pspec))
|
else if (G_IS_PARAM_SPEC_UNICHAR (klass->pspec))
|
||||||
|
@ -66,14 +66,23 @@ struct _GladeSignalEditorPrivate
|
|||||||
GtkTreeViewColumn *column_after;
|
GtkTreeViewColumn *column_after;
|
||||||
|
|
||||||
GtkCellRenderer *renderer_userdata;
|
GtkCellRenderer *renderer_userdata;
|
||||||
|
|
||||||
|
GtkListStore *handler_completion_store;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
SIGNAL_ACTIVATED,
|
SIGNAL_ACTIVATED,
|
||||||
|
CALLBACK_SUGGESTIONS,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
PROP_0,
|
||||||
|
PROP_GLADE_WIDGET
|
||||||
|
};
|
||||||
|
|
||||||
static guint glade_signal_editor_signals[LAST_SIGNAL] = { 0 };
|
static guint glade_signal_editor_signals[LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
/* Utils */
|
/* Utils */
|
||||||
@ -178,36 +187,91 @@ on_handler_edited (GtkCellRendererText* renderer,
|
|||||||
gtk_tree_path_free (tree_path);
|
gtk_tree_path_free (tree_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gchar **
|
||||||
|
glade_signal_editor_callback_suggestions (GladeSignalEditor *editor,
|
||||||
|
GladeSignal *signal)
|
||||||
|
{
|
||||||
|
GladeWidget *widget = glade_signal_editor_get_widget (editor);
|
||||||
|
gchar *signal_name, *name, **suggestions;
|
||||||
|
|
||||||
|
suggestions = g_new (gchar *, 10);
|
||||||
|
|
||||||
|
name = (gchar *) glade_widget_get_name (widget);
|
||||||
|
|
||||||
|
signal_name = g_strdup (glade_signal_get_name (signal));
|
||||||
|
glade_util_replace (signal_name, '-', '_');
|
||||||
|
|
||||||
|
suggestions[0] = g_strdup_printf ("on_%s_%s", name, signal_name);
|
||||||
|
suggestions[1] = g_strdup_printf ("%s_%s_cb", name, signal_name);
|
||||||
|
suggestions[2] = g_strdup ("gtk_widget_show");
|
||||||
|
suggestions[3] = g_strdup ("gtk_widget_hide");
|
||||||
|
suggestions[4] = g_strdup ("gtk_widget_grab_focus");
|
||||||
|
suggestions[5] = g_strdup ("gtk_widget_destroy");
|
||||||
|
suggestions[6] = g_strdup ("gtk_true");
|
||||||
|
suggestions[7] = g_strdup ("gtk_false");
|
||||||
|
suggestions[8] = g_strdup ("gtk_main_quit");
|
||||||
|
suggestions[9] = NULL;
|
||||||
|
|
||||||
|
return suggestions;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_handler_editing_started (GtkCellRenderer *renderer,
|
on_handler_editing_started (GtkCellRenderer *renderer,
|
||||||
GtkCellEditable *editable,
|
GtkCellEditable *editable,
|
||||||
gchar *path,
|
gchar *path,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GladeSignalEditor* self = GLADE_SIGNAL_EDITOR(user_data);
|
/* Check if editable is still an entry */
|
||||||
GtkTreePath* tree_path = gtk_tree_path_new_from_string (path);
|
|
||||||
|
|
||||||
/* Remove the <Type here> */
|
|
||||||
if (GTK_IS_ENTRY (editable))
|
if (GTK_IS_ENTRY (editable))
|
||||||
{
|
{
|
||||||
|
GladeSignalEditor *self = GLADE_SIGNAL_EDITOR (user_data);
|
||||||
|
GladeSignalEditorPrivate *priv = self->priv;
|
||||||
|
GtkEntry *entry = GTK_ENTRY (editable);
|
||||||
|
GtkEntryCompletion *completion;
|
||||||
|
GtkTreePath *tree_path;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GladeSignal *signal;
|
GladeSignal *signal;
|
||||||
gboolean dummy;
|
gchar **suggestions;
|
||||||
gtk_tree_model_get_iter (self->priv->model,
|
gint i;
|
||||||
&iter,
|
|
||||||
tree_path);
|
tree_path = gtk_tree_path_new_from_string (path);
|
||||||
gtk_tree_model_get (self->priv->model,
|
gtk_tree_model_get_iter (priv->model, &iter, tree_path);
|
||||||
&iter,
|
gtk_tree_path_free (tree_path);
|
||||||
|
|
||||||
|
gtk_tree_model_get (priv->model, &iter,
|
||||||
GLADE_SIGNAL_COLUMN_SIGNAL, &signal,
|
GLADE_SIGNAL_COLUMN_SIGNAL, &signal,
|
||||||
-1);
|
-1);
|
||||||
dummy = glade_signal_is_dummy (signal);
|
|
||||||
if (dummy)
|
if (glade_signal_is_dummy (signal))
|
||||||
{
|
gtk_entry_set_text (entry, "");
|
||||||
gtk_entry_set_text (GTK_ENTRY (editable), "");
|
|
||||||
}
|
g_signal_emit (self, glade_signal_editor_signals [CALLBACK_SUGGESTIONS], 0, signal, &suggestions);
|
||||||
|
|
||||||
g_object_unref (signal);
|
g_object_unref (signal);
|
||||||
|
|
||||||
|
completion = gtk_entry_completion_new ();
|
||||||
|
gtk_entry_completion_set_text_column (completion, 0);
|
||||||
|
gtk_entry_completion_set_minimum_key_length (completion, 0);
|
||||||
|
gtk_entry_completion_set_inline_completion (completion, FALSE);
|
||||||
|
gtk_entry_completion_set_inline_selection (completion, TRUE);
|
||||||
|
gtk_entry_completion_set_popup_completion (completion, TRUE);
|
||||||
|
gtk_entry_set_completion (entry, NULL);
|
||||||
|
|
||||||
|
gtk_list_store_clear (priv->handler_completion_store);
|
||||||
|
|
||||||
|
if (suggestions)
|
||||||
|
{
|
||||||
|
for (i = 0; suggestions[i]; i++)
|
||||||
|
{
|
||||||
|
gtk_list_store_append (priv->handler_completion_store, &iter);
|
||||||
|
gtk_list_store_set (priv->handler_completion_store, &iter, 0, suggestions[i], -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtk_entry_completion_set_model (completion, GTK_TREE_MODEL (priv->handler_completion_store));
|
||||||
|
gtk_entry_set_completion (entry, completion);
|
||||||
|
g_strfreev (suggestions);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
gtk_tree_path_free (tree_path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -373,6 +437,45 @@ glade_signal_editor_devhelp (GtkCellRenderer * cell,
|
|||||||
g_object_unref (signal);
|
g_object_unref (signal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_signal_editor_get_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
GladeSignalEditor *self = GLADE_SIGNAL_EDITOR (object);
|
||||||
|
GladeSignalEditorPrivate *priv = self->priv;
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
case PROP_GLADE_WIDGET:
|
||||||
|
g_value_set_object (value, priv->widget);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_signal_editor_set_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
GladeSignalEditor *self = GLADE_SIGNAL_EDITOR (object);
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
case PROP_GLADE_WIDGET:
|
||||||
|
glade_signal_editor_load_widget (self, g_value_get_object (value));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* glade_signal_editor_new:
|
* glade_signal_editor_new:
|
||||||
*
|
*
|
||||||
@ -995,6 +1098,9 @@ glade_signal_editor_init (GladeSignalEditor *self)
|
|||||||
G_CALLBACK(glade_signal_editor_drag_begin),
|
G_CALLBACK(glade_signal_editor_drag_begin),
|
||||||
self);
|
self);
|
||||||
|
|
||||||
|
/* Handler completion */
|
||||||
|
priv->handler_completion_store = gtk_list_store_new (1, G_TYPE_STRING);
|
||||||
|
|
||||||
/* Emit created signal */
|
/* Emit created signal */
|
||||||
g_signal_emit_by_name (glade_app_get(), "signal-editor-created", self);
|
g_signal_emit_by_name (glade_app_get(), "signal-editor-created", self);
|
||||||
|
|
||||||
@ -1009,8 +1115,12 @@ glade_signal_editor_class_init (GladeSignalEditorClass *klass)
|
|||||||
glade_signal_editor_parent_class = g_type_class_peek_parent (klass);
|
glade_signal_editor_parent_class = g_type_class_peek_parent (klass);
|
||||||
|
|
||||||
object_class = G_OBJECT_CLASS (klass);
|
object_class = G_OBJECT_CLASS (klass);
|
||||||
|
object_class->get_property = glade_signal_editor_get_property;
|
||||||
|
object_class->set_property = glade_signal_editor_set_property;
|
||||||
object_class->dispose = glade_signal_editor_dispose;
|
object_class->dispose = glade_signal_editor_dispose;
|
||||||
|
|
||||||
|
klass->callback_suggestions = glade_signal_editor_callback_suggestions;
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (GladeSignalEditorPrivate));
|
g_type_class_add_private (klass, sizeof (GladeSignalEditorPrivate));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1028,4 +1138,34 @@ glade_signal_editor_class_init (GladeSignalEditorClass *klass)
|
|||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
GLADE_TYPE_SIGNAL /* Signal data formatted string */
|
GLADE_TYPE_SIGNAL /* Signal data formatted string */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GladeSignalEditor::callback-suggestions:
|
||||||
|
* @editor: the object which received the signal
|
||||||
|
* @signal: the #GladeSignal that needs callbacks suggestions
|
||||||
|
* @suggestions: Return
|
||||||
|
*
|
||||||
|
* Emitted when the editor needs to show a list of callbacks suggestions to the user.
|
||||||
|
*
|
||||||
|
* Returns wheter or not the event was handled.
|
||||||
|
*/
|
||||||
|
glade_signal_editor_signals[CALLBACK_SUGGESTIONS] =
|
||||||
|
g_signal_new ("callback-suggestions",
|
||||||
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
G_SIGNAL_RUN_LAST,
|
||||||
|
G_STRUCT_OFFSET (GladeSignalEditorClass, callback_suggestions),
|
||||||
|
_glade_strv_handled_accumulator,
|
||||||
|
NULL, _glade_marshal_BOXED__OBJECT,
|
||||||
|
G_TYPE_STRV, 1,
|
||||||
|
GLADE_TYPE_SIGNAL
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
g_object_class_install_property (object_class,
|
||||||
|
PROP_GLADE_WIDGET,
|
||||||
|
g_param_spec_object ("glade-widget",
|
||||||
|
"Glade Widget",
|
||||||
|
"The glade widget to edit signals",
|
||||||
|
GTK_TYPE_TREE_MODEL,
|
||||||
|
G_PARAM_READWRITE));
|
||||||
}
|
}
|
||||||
|
@ -31,12 +31,12 @@ struct _GladeSignalEditorClass
|
|||||||
{
|
{
|
||||||
GtkVBoxClass parent_class;
|
GtkVBoxClass parent_class;
|
||||||
|
|
||||||
|
gchar ** (* callback_suggestions) (GladeSignalEditor *editor, GladeSignal *signal);
|
||||||
void (* glade_reserved1) (void);
|
void (* glade_reserved1) (void);
|
||||||
void (* glade_reserved2) (void);
|
void (* glade_reserved2) (void);
|
||||||
void (* glade_reserved3) (void);
|
void (* glade_reserved3) (void);
|
||||||
void (* glade_reserved4) (void);
|
void (* glade_reserved4) (void);
|
||||||
void (* glade_reserved5) (void);
|
void (* glade_reserved5) (void);
|
||||||
void (* glade_reserved6) (void);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GType glade_signal_editor_get_type (void) G_GNUC_CONST;
|
GType glade_signal_editor_get_type (void) G_GNUC_CONST;
|
||||||
|
@ -350,8 +350,8 @@ on_glade_signal_model_added (GladeWidget* widget, const GladeSignal* signal,
|
|||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
const GladeSignalClass* sig_class =
|
const GladeSignalClass *sig_class = glade_signal_get_class (signal);
|
||||||
glade_signal_get_class (signal);
|
|
||||||
glade_signal_model_create_signal_iter (model,
|
glade_signal_model_create_signal_iter (model,
|
||||||
glade_signal_class_get_type (sig_class),
|
glade_signal_class_get_type (sig_class),
|
||||||
signal,
|
signal,
|
||||||
@ -372,8 +372,8 @@ on_glade_signal_model_removed (GladeWidget* widget, const GladeSignal* signal,
|
|||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
const GladeSignalClass* sig_class =
|
const GladeSignalClass *sig_class = glade_signal_get_class (signal);
|
||||||
glade_signal_get_class (signal);
|
|
||||||
glade_signal_model_create_signal_iter (model,
|
glade_signal_model_create_signal_iter (model,
|
||||||
glade_signal_class_get_type (sig_class),
|
glade_signal_class_get_type (sig_class),
|
||||||
signal,
|
signal,
|
||||||
@ -393,6 +393,7 @@ on_glade_signal_model_changed (GladeWidget* widget, const GladeSignal* signal,
|
|||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
const GladeSignalClass *sig_class = glade_signal_get_class (signal);
|
const GladeSignalClass *sig_class = glade_signal_get_class (signal);
|
||||||
|
|
||||||
glade_signal_model_create_signal_iter (model,
|
glade_signal_model_create_signal_iter (model,
|
||||||
glade_signal_class_get_type (sig_class),
|
glade_signal_class_get_type (sig_class),
|
||||||
signal,
|
signal,
|
||||||
@ -578,13 +579,11 @@ glade_signal_model_get_value (GtkTreeModel* model,
|
|||||||
case GLADE_SIGNAL_COLUMN_NAME:
|
case GLADE_SIGNAL_COLUMN_NAME:
|
||||||
if (handler)
|
if (handler)
|
||||||
{
|
{
|
||||||
g_value_set_static_string (value,
|
g_value_set_static_string (value, glade_signal_get_name (handler));
|
||||||
glade_signal_get_name (handler));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_value_set_static_string (value,
|
g_value_set_static_string (value, widget);
|
||||||
widget);
|
|
||||||
break;
|
break;
|
||||||
case GLADE_SIGNAL_COLUMN_SHOW_NAME:
|
case GLADE_SIGNAL_COLUMN_SHOW_NAME:
|
||||||
if (handler)
|
if (handler)
|
||||||
@ -592,61 +591,49 @@ glade_signal_model_get_value (GtkTreeModel* model,
|
|||||||
GPtrArray *handlers = g_hash_table_lookup (sig_model->priv->signals,
|
GPtrArray *handlers = g_hash_table_lookup (sig_model->priv->signals,
|
||||||
glade_signal_get_name (handler));
|
glade_signal_get_name (handler));
|
||||||
if (!handlers || !handlers->len || g_ptr_array_find (handlers, handler) == 0)
|
if (!handlers || !handlers->len || g_ptr_array_find (handlers, handler) == 0)
|
||||||
g_value_set_boolean (value,
|
g_value_set_boolean (value, TRUE);
|
||||||
TRUE);
|
|
||||||
else
|
else
|
||||||
g_value_set_boolean (value,
|
g_value_set_boolean (value,
|
||||||
FALSE);
|
FALSE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (widget)
|
else if (widget)
|
||||||
g_value_set_boolean (value,
|
g_value_set_boolean (value, TRUE);
|
||||||
TRUE);
|
|
||||||
break;
|
break;
|
||||||
case GLADE_SIGNAL_COLUMN_HANDLER:
|
case GLADE_SIGNAL_COLUMN_HANDLER:
|
||||||
if (handler)
|
if (handler)
|
||||||
g_value_set_static_string (value,
|
g_value_set_static_string (value, glade_signal_get_handler (handler));
|
||||||
glade_signal_get_handler (handler));
|
|
||||||
else
|
else
|
||||||
g_value_set_static_string (value,
|
g_value_set_static_string (value, "");
|
||||||
"");
|
|
||||||
break;
|
break;
|
||||||
case GLADE_SIGNAL_COLUMN_OBJECT:
|
case GLADE_SIGNAL_COLUMN_OBJECT:
|
||||||
if (handler)
|
if (handler)
|
||||||
{
|
{
|
||||||
const gchar *userdata = glade_signal_get_userdata (handler);
|
const gchar *userdata = glade_signal_get_userdata (handler);
|
||||||
if (userdata && strlen (userdata))
|
if (userdata && strlen (userdata))
|
||||||
g_value_set_static_string (value,
|
g_value_set_static_string (value, userdata);
|
||||||
userdata);
|
|
||||||
else
|
else
|
||||||
g_value_set_static_string (value,
|
g_value_set_static_string (value, USERDATA_DEFAULT);
|
||||||
USERDATA_DEFAULT);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_value_set_static_string (value,
|
g_value_set_static_string (value, "");
|
||||||
"");
|
|
||||||
break;
|
break;
|
||||||
case GLADE_SIGNAL_COLUMN_SWAP:
|
case GLADE_SIGNAL_COLUMN_SWAP:
|
||||||
if (handler)
|
if (handler)
|
||||||
g_value_set_boolean (value,
|
g_value_set_boolean (value, glade_signal_get_swapped (handler));
|
||||||
glade_signal_get_swapped (handler));
|
|
||||||
else
|
else
|
||||||
g_value_set_boolean (value,
|
g_value_set_boolean (value, FALSE);
|
||||||
FALSE);
|
|
||||||
break;
|
break;
|
||||||
case GLADE_SIGNAL_COLUMN_AFTER:
|
case GLADE_SIGNAL_COLUMN_AFTER:
|
||||||
if (handler)
|
if (handler)
|
||||||
g_value_set_boolean (value,
|
g_value_set_boolean (value, glade_signal_get_after (handler));
|
||||||
glade_signal_get_after (handler));
|
|
||||||
else
|
else
|
||||||
g_value_set_boolean (value,
|
g_value_set_boolean (value, FALSE);
|
||||||
FALSE);
|
|
||||||
break;
|
break;
|
||||||
case GLADE_SIGNAL_COLUMN_TOOLTIP:
|
case GLADE_SIGNAL_COLUMN_TOOLTIP:
|
||||||
if (handler)
|
if (handler)
|
||||||
g_value_set_string (value,
|
g_value_set_string (value, glade_signal_get_support_warning (handler));
|
||||||
glade_signal_get_support_warning (handler));
|
|
||||||
else
|
else
|
||||||
g_value_set_static_string (value, NULL);
|
g_value_set_static_string (value, NULL);
|
||||||
break;
|
break;
|
||||||
@ -716,8 +703,7 @@ glade_signal_model_iter_next (GtkTreeModel* model,
|
|||||||
|
|
||||||
if (handler)
|
if (handler)
|
||||||
{
|
{
|
||||||
const GladeSignalClass* sig_class =
|
const GladeSignalClass *sig_class = glade_signal_get_class (handler);
|
||||||
glade_signal_get_class (handler);
|
|
||||||
GList *signals =
|
GList *signals =
|
||||||
glade_signal_model_create_signal_list (sig_model,
|
glade_signal_model_create_signal_list (sig_model,
|
||||||
widget);
|
widget);
|
||||||
@ -761,8 +747,7 @@ glade_signal_model_iter_next (GtkTreeModel* model,
|
|||||||
}
|
}
|
||||||
else if (widget)
|
else if (widget)
|
||||||
{
|
{
|
||||||
gint new_index = g_list_index (sig_model->priv->widgets,
|
gint new_index = g_list_index (sig_model->priv->widgets, widget) + 1;
|
||||||
widget) + 1;
|
|
||||||
|
|
||||||
return gtk_tree_model_iter_nth_child (model, iter, NULL, new_index);
|
return gtk_tree_model_iter_nth_child (model, iter, NULL, new_index);
|
||||||
}
|
}
|
||||||
@ -774,16 +759,17 @@ glade_signal_model_iter_next (GtkTreeModel* model,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
glade_signal_model_iter_n_children (GtkTreeModel* model,
|
glade_signal_model_iter_n_children (GtkTreeModel *model, GtkTreeIter *iter)
|
||||||
GtkTreeIter* iter)
|
|
||||||
{
|
{
|
||||||
GladeSignal *handler;
|
GladeSignal *handler;
|
||||||
GladeSignalModel *sig_model;
|
GladeSignalModel *sig_model;
|
||||||
const gchar *widget;
|
const gchar *widget;
|
||||||
|
|
||||||
g_return_val_if_fail (iter != NULL, 0);
|
|
||||||
g_return_val_if_fail (GLADE_IS_SIGNAL_MODEL(model), 0);
|
g_return_val_if_fail (GLADE_IS_SIGNAL_MODEL(model), 0);
|
||||||
|
|
||||||
|
/* FIXME: return the number of toplevels, if it makes sense in this context */
|
||||||
|
if (iter == NULL) return 0;
|
||||||
|
|
||||||
handler = iter->user_data2;
|
handler = iter->user_data2;
|
||||||
sig_model = GLADE_SIGNAL_MODEL (model);
|
sig_model = GLADE_SIGNAL_MODEL (model);
|
||||||
widget = iter->user_data;
|
widget = iter->user_data;
|
||||||
|
@ -191,7 +191,9 @@ glade_utils_get_pspec_from_funcname (const gchar * funcname)
|
|||||||
gint
|
gint
|
||||||
glade_util_ui_message (GtkWidget *parent,
|
glade_util_ui_message (GtkWidget *parent,
|
||||||
GladeUIMessageType type,
|
GladeUIMessageType type,
|
||||||
GtkWidget * widget, const gchar * format, ...)
|
GtkWidget *widget,
|
||||||
|
const gchar *format,
|
||||||
|
...)
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
GtkMessageType message_type = GTK_MESSAGE_INFO;
|
GtkMessageType message_type = GTK_MESSAGE_INFO;
|
||||||
@ -322,8 +324,10 @@ remove_message_timeout (FlashInfo * fi)
|
|||||||
* Flash a temporary message on the statusbar.
|
* Flash a temporary message on the statusbar.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
glade_util_flash_message (GtkWidget * statusbar, guint context_id,
|
glade_util_flash_message (GtkWidget *statusbar,
|
||||||
gchar * format, ...)
|
guint context_id,
|
||||||
|
gchar *format,
|
||||||
|
...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
FlashInfo *fi;
|
FlashInfo *fi;
|
||||||
@ -440,7 +444,8 @@ glade_util_compare_stock_labels (gconstpointer a, gconstpointer b)
|
|||||||
GtkWidget *
|
GtkWidget *
|
||||||
glade_util_file_dialog_new (const gchar *title,
|
glade_util_file_dialog_new (const gchar *title,
|
||||||
GladeProject *project,
|
GladeProject *project,
|
||||||
GtkWindow * parent, GladeUtilFileDialogType action)
|
GtkWindow *parent,
|
||||||
|
GladeUtilFileDialogType action)
|
||||||
{
|
{
|
||||||
GtkWidget *file_dialog;
|
GtkWidget *file_dialog;
|
||||||
GtkFileFilter *file_filter;
|
GtkFileFilter *file_filter;
|
||||||
@ -635,7 +640,9 @@ glade_util_count_placeholders (GladeWidget * parent)
|
|||||||
|
|
||||||
static GtkTreeIter *
|
static GtkTreeIter *
|
||||||
glade_util_find_iter (GtkTreeModel *model,
|
glade_util_find_iter (GtkTreeModel *model,
|
||||||
GtkTreeIter * iter, GladeWidget * findme, gint column)
|
GtkTreeIter *iter,
|
||||||
|
GladeWidget *findme,
|
||||||
|
gint column)
|
||||||
{
|
{
|
||||||
GtkTreeIter *retval = NULL;
|
GtkTreeIter *retval = NULL;
|
||||||
GObject *object = NULL;
|
GObject *object = NULL;
|
||||||
@ -704,7 +711,8 @@ glade_util_find_iter (GtkTreeModel * model,
|
|||||||
*/
|
*/
|
||||||
GtkTreeIter *
|
GtkTreeIter *
|
||||||
glade_util_find_iter_by_widget (GtkTreeModel *model,
|
glade_util_find_iter_by_widget (GtkTreeModel *model,
|
||||||
GladeWidget * findme, gint column)
|
GladeWidget *findme,
|
||||||
|
gint column)
|
||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
if (gtk_tree_model_get_iter_first (model, &iter))
|
if (gtk_tree_model_get_iter_first (model, &iter))
|
||||||
@ -1067,7 +1075,8 @@ glade_util_get_devhelp_icon (GtkIconSize size)
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
glade_util_search_devhelp (const gchar *book,
|
glade_util_search_devhelp (const gchar *book,
|
||||||
const gchar * page, const gchar * search)
|
const gchar *page,
|
||||||
|
const gchar *search)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
gchar *book_comm = NULL, *page_comm = NULL, *search_comm = NULL;
|
gchar *book_comm = NULL, *page_comm = NULL, *search_comm = NULL;
|
||||||
@ -1105,40 +1114,24 @@ glade_util_search_devhelp (const gchar * book,
|
|||||||
GtkWidget *
|
GtkWidget *
|
||||||
glade_util_get_placeholder_from_pointer (GtkContainer *container)
|
glade_util_get_placeholder_from_pointer (GtkContainer *container)
|
||||||
{
|
{
|
||||||
GtkWidget *toplevel;
|
GdkDeviceManager *manager;
|
||||||
GtkWidget *retval = NULL, *child;
|
GdkDisplay *display;
|
||||||
GtkAllocation allocation;
|
GdkDevice *device;
|
||||||
GList *c, *l;
|
GdkWindow *window;
|
||||||
gint x, y, x2, y2;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_CONTAINER (container), NULL);
|
if (((display = gtk_widget_get_display (GTK_WIDGET (container))) ||
|
||||||
|
(display = gdk_display_get_default ())) &&
|
||||||
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (container));
|
(manager = gdk_display_get_device_manager (display)) &&
|
||||||
|
(device = gdk_device_manager_get_client_pointer (manager)) &&
|
||||||
gtk_widget_get_pointer (toplevel, &x, &y);
|
(window = gdk_device_get_window_at_position (device, NULL, NULL)))
|
||||||
|
|
||||||
for (c = l = glade_util_container_get_all_children (container);
|
|
||||||
l; l = g_list_next (l))
|
|
||||||
{
|
{
|
||||||
child = l->data;
|
gpointer widget;
|
||||||
|
gdk_window_get_user_data (window, &widget);
|
||||||
|
|
||||||
if (GLADE_IS_PLACEHOLDER (child) && gtk_widget_get_mapped (child))
|
return GLADE_IS_PLACEHOLDER (widget) ? GTK_WIDGET (widget) : NULL;
|
||||||
{
|
|
||||||
gtk_widget_translate_coordinates (toplevel, child, x, y, &x2, &y2);
|
|
||||||
|
|
||||||
gtk_widget_get_allocation (child, &allocation);
|
|
||||||
if (x2 >= 0 && y2 >= 0 &&
|
|
||||||
x2 <= allocation.width && y2 <= allocation.height)
|
|
||||||
{
|
|
||||||
retval = child;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g_list_free (c);
|
return NULL;
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1298,7 +1291,8 @@ glade_utils_enum_value_from_string (GType enum_type, const gchar * strval)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
glade_utils_enum_string_from_value_real (GType enum_type, gint value,
|
glade_utils_enum_string_from_value_real (GType enum_type,
|
||||||
|
gint value,
|
||||||
gboolean displayable)
|
gboolean displayable)
|
||||||
{
|
{
|
||||||
GValue gvalue = { 0, };
|
GValue gvalue = { 0, };
|
||||||
@ -1360,7 +1354,8 @@ glade_utils_flags_value_from_string (GType flags_type, const gchar * strval)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
glade_utils_flags_string_from_value_real (GType flags_type, gint value,
|
glade_utils_flags_string_from_value_real (GType flags_type,
|
||||||
|
gint value,
|
||||||
gboolean displayable)
|
gboolean displayable)
|
||||||
{
|
{
|
||||||
GValue gvalue = { 0, };
|
GValue gvalue = { 0, };
|
||||||
@ -1640,7 +1635,8 @@ glade_utils_liststore_from_enum_type (GType enum_type, gboolean include_empty)
|
|||||||
*/
|
*/
|
||||||
gint
|
gint
|
||||||
glade_utils_hijack_key_press (GtkWindow *win,
|
glade_utils_hijack_key_press (GtkWindow *win,
|
||||||
GdkEventKey * event, gpointer user_data)
|
GdkEventKey *event,
|
||||||
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkWidget *focus_widget;
|
GtkWidget *focus_widget;
|
||||||
|
|
||||||
@ -1662,7 +1658,8 @@ glade_utils_hijack_key_press (GtkWindow * win,
|
|||||||
void
|
void
|
||||||
glade_utils_cairo_draw_line (cairo_t *cr,
|
glade_utils_cairo_draw_line (cairo_t *cr,
|
||||||
GdkColor *color,
|
GdkColor *color,
|
||||||
gint x1, gint y1, gint x2, gint y2)
|
gint x1, gint y1,
|
||||||
|
gint x2, gint y2)
|
||||||
{
|
{
|
||||||
cairo_save (cr);
|
cairo_save (cr);
|
||||||
|
|
||||||
@ -1681,7 +1678,8 @@ void
|
|||||||
glade_utils_cairo_draw_rectangle (cairo_t *cr,
|
glade_utils_cairo_draw_rectangle (cairo_t *cr,
|
||||||
GdkColor *color,
|
GdkColor *color,
|
||||||
gboolean filled,
|
gboolean filled,
|
||||||
gint x, gint y, gint width, gint height)
|
gint x, gint y,
|
||||||
|
gint width, gint height)
|
||||||
{
|
{
|
||||||
gdk_cairo_set_source_color (cr, color);
|
gdk_cairo_set_source_color (cr, color);
|
||||||
|
|
||||||
|
@ -734,7 +734,7 @@ glade_widget_adaptor_finalize (GObject * object)
|
|||||||
g_free (adaptor->priv->special_child_type);
|
g_free (adaptor->priv->special_child_type);
|
||||||
|
|
||||||
if (adaptor->priv->cursor != NULL)
|
if (adaptor->priv->cursor != NULL)
|
||||||
gdk_cursor_unref (adaptor->priv->cursor);
|
g_object_unref (adaptor->priv->cursor);
|
||||||
|
|
||||||
if (adaptor->priv->name)
|
if (adaptor->priv->name)
|
||||||
g_free (adaptor->priv->name);
|
g_free (adaptor->priv->name);
|
||||||
|
@ -283,7 +283,7 @@ glade_eprop_accel_populate_view (GladeEditorProperty * eprop,
|
|||||||
{
|
{
|
||||||
info = l->data;
|
info = l->data;
|
||||||
|
|
||||||
if (strcmp (info->signal, glade_signal_class_get_name (sclass)))
|
if (g_strcmp0 (info->signal, glade_signal_class_get_name (sclass)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
accel_text = gtk_accelerator_name (info->key, info->modifiers);
|
accel_text = gtk_accelerator_name (info->key, info->modifiers);
|
||||||
@ -520,7 +520,7 @@ glade_eprop_accel_show_dialog (GtkWidget * dialog_button,
|
|||||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||||
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
|
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 6);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
||||||
@ -593,7 +593,7 @@ glade_eprop_accel_create_input (GladeEditorProperty * eprop)
|
|||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
eprop_accel->entry = gtk_entry_new ();
|
eprop_accel->entry = gtk_entry_new ();
|
||||||
gtk_editable_set_editable (GTK_EDITABLE (eprop_accel->entry), FALSE);
|
gtk_editable_set_editable (GTK_EDITABLE (eprop_accel->entry), FALSE);
|
||||||
gtk_widget_show (eprop_accel->entry);
|
gtk_widget_show (eprop_accel->entry);
|
||||||
|
@ -1042,7 +1042,7 @@ glade_eprop_attrs_show_dialog (GtkWidget * dialog_button,
|
|||||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||||
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
|
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 6);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
gtk_widget_show (vbox);
|
gtk_widget_show (vbox);
|
||||||
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
|
||||||
@ -1124,7 +1124,7 @@ glade_eprop_attrs_create_input (GladeEditorProperty * eprop)
|
|||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
|
|
||||||
button = gtk_button_new_from_stock (GTK_STOCK_EDIT);
|
button = gtk_button_new_from_stock (GTK_STOCK_EDIT);
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
|
@ -436,7 +436,7 @@ glade_button_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
0, 12, 0);
|
0, 12, 0);
|
||||||
gtk_container_add (GTK_CONTAINER (frame), button_editor->standard_frame);
|
gtk_container_add (GTK_CONTAINER (frame), button_editor->standard_frame);
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 8);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||||
gtk_container_add (GTK_CONTAINER (button_editor->standard_frame), vbox);
|
gtk_container_add (GTK_CONTAINER (button_editor->standard_frame), vbox);
|
||||||
|
|
||||||
/* Populate stock frame here... */
|
/* Populate stock frame here... */
|
||||||
|
@ -344,8 +344,8 @@ glade_cell_renderer_editor_new (GladeWidgetAdaptor * adaptor,
|
|||||||
tab->use_attr_pclass = use_attr_pclass;
|
tab->use_attr_pclass = use_attr_pclass;
|
||||||
|
|
||||||
/* Label appearance... */
|
/* Label appearance... */
|
||||||
hbox_left = gtk_hbox_new (FALSE, 0);
|
hbox_left = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
hbox_right = gtk_hbox_new (FALSE, 0);
|
hbox_right = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
gtk_widget_set_hexpand (hbox_right, TRUE);
|
gtk_widget_set_hexpand (hbox_right, TRUE);
|
||||||
|
|
||||||
tab->attributes_check = gtk_check_button_new ();
|
tab->attributes_check = gtk_check_button_new ();
|
||||||
@ -567,7 +567,7 @@ glade_eprop_cell_attribute_create_input (GladeEditorProperty * eprop)
|
|||||||
GtkAdjustment *adjustment;
|
GtkAdjustment *adjustment;
|
||||||
GtkCellRenderer *cell;
|
GtkCellRenderer *cell;
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 2);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||||
|
|
||||||
adjustment = glade_property_class_make_adjustment (glade_editor_property_get_pclass (eprop));
|
adjustment = glade_property_class_make_adjustment (glade_editor_property_get_pclass (eprop));
|
||||||
eprop_attribute->spin = gtk_spin_button_new (adjustment, 1.0, 0);
|
eprop_attribute->spin = gtk_spin_button_new (adjustment, 1.0, 0);
|
||||||
|
@ -808,7 +808,7 @@ glade_eprop_column_types_create_input (GladeEditorProperty * eprop)
|
|||||||
GtkCellRenderer *cell;
|
GtkCellRenderer *cell;
|
||||||
gchar *string;
|
gchar *string;
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 2);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||||
|
|
||||||
/* hbox = gtk_hbox_new (FALSE, 4); */
|
/* hbox = gtk_hbox_new (FALSE, 4); */
|
||||||
|
|
||||||
|
@ -513,7 +513,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
/* Text */
|
/* Text */
|
||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "text", FALSE, TRUE);
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "text", FALSE, TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
entry_editor->text_radio = gtk_radio_button_new (NULL);
|
entry_editor->text_radio = gtk_radio_button_new (NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->text_radio, FALSE, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->text_radio, FALSE, FALSE,
|
||||||
2);
|
2);
|
||||||
@ -526,7 +526,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "buffer", FALSE,
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "buffer", FALSE,
|
||||||
TRUE);
|
TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
entry_editor->buffer_radio = gtk_radio_button_new_from_widget
|
entry_editor->buffer_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (entry_editor->text_radio));
|
(GTK_RADIO_BUTTON (entry_editor->text_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->buffer_radio, FALSE, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->buffer_radio, FALSE, FALSE,
|
||||||
@ -596,7 +596,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, PIXBUF_NAME (TRUE),
|
glade_widget_adaptor_create_eprop_by_name (adaptor, PIXBUF_NAME (TRUE),
|
||||||
FALSE, TRUE);
|
FALSE, TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
entry_editor->primary_pixbuf_radio = gtk_radio_button_new (NULL);
|
entry_editor->primary_pixbuf_radio = gtk_radio_button_new (NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->primary_pixbuf_radio, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->primary_pixbuf_radio, FALSE,
|
||||||
FALSE, 2);
|
FALSE, 2);
|
||||||
@ -609,7 +609,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, STOCK_NAME (TRUE),
|
glade_widget_adaptor_create_eprop_by_name (adaptor, STOCK_NAME (TRUE),
|
||||||
FALSE, TRUE);
|
FALSE, TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
entry_editor->primary_stock_radio = gtk_radio_button_new_from_widget
|
entry_editor->primary_stock_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (entry_editor->primary_pixbuf_radio));
|
(GTK_RADIO_BUTTON (entry_editor->primary_pixbuf_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->primary_stock_radio, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->primary_stock_radio, FALSE,
|
||||||
@ -623,7 +623,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, ICON_NAME_NAME (TRUE),
|
glade_widget_adaptor_create_eprop_by_name (adaptor, ICON_NAME_NAME (TRUE),
|
||||||
FALSE, TRUE);
|
FALSE, TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
entry_editor->primary_icon_name_radio = gtk_radio_button_new_from_widget
|
entry_editor->primary_icon_name_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (entry_editor->primary_pixbuf_radio));
|
(GTK_RADIO_BUTTON (entry_editor->primary_pixbuf_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->primary_icon_name_radio,
|
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->primary_icon_name_radio,
|
||||||
@ -690,7 +690,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, PIXBUF_NAME (FALSE),
|
glade_widget_adaptor_create_eprop_by_name (adaptor, PIXBUF_NAME (FALSE),
|
||||||
FALSE, TRUE);
|
FALSE, TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
entry_editor->secondary_pixbuf_radio = gtk_radio_button_new (NULL);
|
entry_editor->secondary_pixbuf_radio = gtk_radio_button_new (NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->secondary_pixbuf_radio,
|
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->secondary_pixbuf_radio,
|
||||||
FALSE, FALSE, 2);
|
FALSE, FALSE, 2);
|
||||||
@ -703,7 +703,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, STOCK_NAME (FALSE),
|
glade_widget_adaptor_create_eprop_by_name (adaptor, STOCK_NAME (FALSE),
|
||||||
FALSE, TRUE);
|
FALSE, TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
entry_editor->secondary_stock_radio = gtk_radio_button_new_from_widget
|
entry_editor->secondary_stock_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (entry_editor->secondary_pixbuf_radio));
|
(GTK_RADIO_BUTTON (entry_editor->secondary_pixbuf_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->secondary_stock_radio,
|
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->secondary_stock_radio,
|
||||||
@ -718,7 +718,7 @@ glade_entry_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
glade_widget_adaptor_create_eprop_by_name (adaptor,
|
glade_widget_adaptor_create_eprop_by_name (adaptor,
|
||||||
ICON_NAME_NAME (FALSE), FALSE,
|
ICON_NAME_NAME (FALSE), FALSE,
|
||||||
TRUE);
|
TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
entry_editor->secondary_icon_name_radio = gtk_radio_button_new_from_widget
|
entry_editor->secondary_icon_name_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (entry_editor->secondary_pixbuf_radio));
|
(GTK_RADIO_BUTTON (entry_editor->secondary_pixbuf_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->secondary_icon_name_radio,
|
gtk_box_pack_start (GTK_BOX (hbox), entry_editor->secondary_icon_name_radio,
|
||||||
|
@ -151,7 +151,7 @@ glade_icon_factory_editor_new (GladeWidgetAdaptor * adaptor,
|
|||||||
alignment = gtk_alignment_new (0.5F, 0.5F, 1.0F, 1.0F);
|
alignment = gtk_alignment_new (0.5F, 0.5F, 1.0F, 1.0F);
|
||||||
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 0, 12, 0);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 0, 12, 0);
|
||||||
gtk_container_add (GTK_CONTAINER (frame), alignment);
|
gtk_container_add (GTK_CONTAINER (frame), alignment);
|
||||||
vbox = gtk_vbox_new (FALSE, 0);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
gtk_container_add (GTK_CONTAINER (alignment), vbox);
|
gtk_container_add (GTK_CONTAINER (alignment), vbox);
|
||||||
|
|
||||||
/* Add descriptive label */
|
/* Add descriptive label */
|
||||||
|
@ -948,8 +948,8 @@ glade_eprop_icon_sources_create_input (GladeEditorProperty * eprop)
|
|||||||
GladeEPropIconSources *eprop_sources = GLADE_EPROP_ICON_SOURCES (eprop);
|
GladeEPropIconSources *eprop_sources = GLADE_EPROP_ICON_SOURCES (eprop);
|
||||||
GtkWidget *vbox, *hbox, *button, *swin;
|
GtkWidget *vbox, *hbox, *button, *swin;
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 2);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||||
hbox = gtk_hbox_new (FALSE, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
|
|
||||||
/* hbox with comboboxentry add/remove source buttons on the right... */
|
/* hbox with comboboxentry add/remove source buttons on the right... */
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||||
|
@ -315,7 +315,7 @@ glade_image_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
/* Stock image... */
|
/* Stock image... */
|
||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "stock", FALSE, TRUE);
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "stock", FALSE, TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
image_editor->stock_radio = gtk_radio_button_new (NULL);
|
image_editor->stock_radio = gtk_radio_button_new (NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), image_editor->stock_radio, FALSE, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), image_editor->stock_radio, FALSE, FALSE,
|
||||||
2);
|
2);
|
||||||
@ -328,7 +328,7 @@ glade_image_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "icon-name", FALSE,
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "icon-name", FALSE,
|
||||||
TRUE);
|
TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
image_editor->icon_radio = gtk_radio_button_new_from_widget
|
image_editor->icon_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (image_editor->stock_radio));
|
(GTK_RADIO_BUTTON (image_editor->stock_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), image_editor->icon_radio, FALSE, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), image_editor->icon_radio, FALSE, FALSE,
|
||||||
@ -342,7 +342,7 @@ glade_image_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "pixbuf", FALSE,
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "pixbuf", FALSE,
|
||||||
TRUE);
|
TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
image_editor->file_radio = gtk_radio_button_new_from_widget
|
image_editor->file_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (image_editor->stock_radio));
|
(GTK_RADIO_BUTTON (image_editor->stock_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), image_editor->file_radio, FALSE, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), image_editor->file_radio, FALSE, FALSE,
|
||||||
|
@ -332,7 +332,7 @@ glade_image_item_editor_new (GladeWidgetAdaptor * adaptor,
|
|||||||
(GTK_RADIO_BUTTON (item_editor->stock_radio),
|
(GTK_RADIO_BUTTON (item_editor->stock_radio),
|
||||||
_("Custom label and image:"));
|
_("Custom label and image:"));
|
||||||
table_attach (main_table, item_editor->custom_radio, 0, 2);
|
table_attach (main_table, item_editor->custom_radio, 0, 2);
|
||||||
vbox = gtk_vbox_new (FALSE, 0);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
gtk_grid_attach (GTK_GRID (main_table), vbox, 0, 3, 2, 1);
|
gtk_grid_attach (GTK_GRID (main_table), vbox, 0, 3, 2, 1);
|
||||||
gtk_widget_set_hexpand (vbox, TRUE);
|
gtk_widget_set_hexpand (vbox, TRUE);
|
||||||
|
|
||||||
|
@ -518,7 +518,7 @@ append_label_appearance (GladeLabelEditor * label_editor,
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "glade-attributes",
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "glade-attributes",
|
||||||
FALSE, TRUE);
|
FALSE, TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
label_editor->attributes_radio = gtk_radio_button_new (NULL);
|
label_editor->attributes_radio = gtk_radio_button_new (NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->attributes_radio, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), label_editor->attributes_radio, FALSE,
|
||||||
FALSE, 2);
|
FALSE, 2);
|
||||||
@ -531,7 +531,7 @@ append_label_appearance (GladeLabelEditor * label_editor,
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "use-markup", FALSE,
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "use-markup", FALSE,
|
||||||
TRUE);
|
TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
label_editor->markup_radio = gtk_radio_button_new_from_widget
|
label_editor->markup_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (label_editor->attributes_radio));
|
(GTK_RADIO_BUTTON (label_editor->attributes_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->markup_radio, FALSE, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), label_editor->markup_radio, FALSE, FALSE,
|
||||||
@ -545,7 +545,7 @@ append_label_appearance (GladeLabelEditor * label_editor,
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "pattern", FALSE,
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "pattern", FALSE,
|
||||||
TRUE);
|
TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
label_editor->pattern_radio = gtk_radio_button_new_from_widget
|
label_editor->pattern_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (label_editor->attributes_radio));
|
(GTK_RADIO_BUTTON (label_editor->attributes_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->pattern_radio, FALSE, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), label_editor->pattern_radio, FALSE, FALSE,
|
||||||
@ -617,7 +617,7 @@ append_label_formatting (GladeLabelEditor * label_editor,
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "width-chars", FALSE,
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "width-chars", FALSE,
|
||||||
TRUE);
|
TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
label_editor->width_radio = gtk_radio_button_new (NULL);
|
label_editor->width_radio = gtk_radio_button_new (NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->width_radio, FALSE, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), label_editor->width_radio, FALSE, FALSE,
|
||||||
2);
|
2);
|
||||||
@ -630,7 +630,7 @@ append_label_formatting (GladeLabelEditor * label_editor,
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "max-width-chars",
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "max-width-chars",
|
||||||
FALSE, TRUE);
|
FALSE, TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
label_editor->max_width_radio = gtk_radio_button_new_from_widget
|
label_editor->max_width_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (label_editor->width_radio));
|
(GTK_RADIO_BUTTON (label_editor->width_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->max_width_radio, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), label_editor->max_width_radio, FALSE,
|
||||||
@ -671,7 +671,7 @@ append_label_wrapping (GladeLabelEditor * label_editor,
|
|||||||
gtk_container_add (GTK_CONTAINER (alignment), table);
|
gtk_container_add (GTK_CONTAINER (alignment), table);
|
||||||
|
|
||||||
/* Append defaut epropless radio... */
|
/* Append defaut epropless radio... */
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
label_editor->wrap_free_radio = gtk_radio_button_new (NULL);
|
label_editor->wrap_free_radio = gtk_radio_button_new (NULL);
|
||||||
label_editor->wrap_free_label = gtk_label_new (_("Text wraps normally"));
|
label_editor->wrap_free_label = gtk_label_new (_("Text wraps normally"));
|
||||||
gtk_misc_set_alignment (GTK_MISC (label_editor->wrap_free_label), 0.0F, 0.5F);
|
gtk_misc_set_alignment (GTK_MISC (label_editor->wrap_free_label), 0.0F, 0.5F);
|
||||||
@ -685,7 +685,7 @@ append_label_wrapping (GladeLabelEditor * label_editor,
|
|||||||
single_line_eprop =
|
single_line_eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "single-line-mode",
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "single-line-mode",
|
||||||
FALSE, TRUE);
|
FALSE, TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
label_editor->single_radio = gtk_radio_button_new_from_widget
|
label_editor->single_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (label_editor->wrap_free_radio));
|
(GTK_RADIO_BUTTON (label_editor->wrap_free_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->single_radio, FALSE, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), label_editor->single_radio, FALSE, FALSE,
|
||||||
@ -700,7 +700,7 @@ append_label_wrapping (GladeLabelEditor * label_editor,
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "wrap-mode", FALSE,
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "wrap-mode", FALSE,
|
||||||
TRUE);
|
TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
label_editor->wrap_mode_radio = gtk_radio_button_new_from_widget
|
label_editor->wrap_mode_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (label_editor->wrap_free_radio));
|
(GTK_RADIO_BUTTON (label_editor->wrap_free_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label_editor->wrap_mode_radio, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), label_editor->wrap_mode_radio, FALSE,
|
||||||
|
@ -1108,9 +1108,9 @@ glade_eprop_model_data_create_input (GladeEditorProperty * eprop)
|
|||||||
GtkWidget *vbox, *hbox, *button, *swin, *label;
|
GtkWidget *vbox, *hbox, *button, *swin, *label;
|
||||||
gchar *string;
|
gchar *string;
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 2);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
|
|
||||||
/* hbox with add/remove row buttons on the right... */
|
/* hbox with add/remove row buttons on the right... */
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||||
|
@ -146,7 +146,7 @@ glade_store_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
alignment = gtk_alignment_new (0.5F, 0.5F, 1.0F, 1.0F);
|
alignment = gtk_alignment_new (0.5F, 0.5F, 1.0F, 1.0F);
|
||||||
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 0, 12, 0);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 0, 12, 0);
|
||||||
gtk_container_add (GTK_CONTAINER (frame), alignment);
|
gtk_container_add (GTK_CONTAINER (frame), alignment);
|
||||||
vbox = gtk_vbox_new (FALSE, 0);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
gtk_container_add (GTK_CONTAINER (alignment), vbox);
|
gtk_container_add (GTK_CONTAINER (alignment), vbox);
|
||||||
|
|
||||||
/* Add descriptive label */
|
/* Add descriptive label */
|
||||||
@ -179,7 +179,7 @@ glade_store_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
alignment = gtk_alignment_new (0.5F, 0.5F, 1.0F, 1.0F);
|
alignment = gtk_alignment_new (0.5F, 0.5F, 1.0F, 1.0F);
|
||||||
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 0, 12, 0);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 0, 12, 0);
|
||||||
gtk_container_add (GTK_CONTAINER (frame), alignment);
|
gtk_container_add (GTK_CONTAINER (frame), alignment);
|
||||||
vbox = gtk_vbox_new (FALSE, 0);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
gtk_container_add (GTK_CONTAINER (alignment), vbox);
|
gtk_container_add (GTK_CONTAINER (alignment), vbox);
|
||||||
|
|
||||||
/* Add descriptive label */
|
/* Add descriptive label */
|
||||||
|
@ -65,7 +65,7 @@ glade_text_button_init (GladeTextButton * self)
|
|||||||
|
|
||||||
gtk_alignment_set_padding (GTK_ALIGNMENT (self), 1, 1, 2, 2);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (self), 1, 1, 2, 2);
|
||||||
|
|
||||||
self->hbox = gtk_hbox_new (FALSE, 2);
|
self->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (self), self->hbox);
|
gtk_container_add (GTK_CONTAINER (self), self->hbox);
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ glade_tool_button_editor_new (GladeWidgetAdaptor * adaptor,
|
|||||||
/* Standard label... */
|
/* Standard label... */
|
||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "label", FALSE, TRUE);
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "label", FALSE, TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
button_editor->standard_label_radio = gtk_radio_button_new (NULL);
|
button_editor->standard_label_radio = gtk_radio_button_new (NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button_editor->standard_label_radio,
|
gtk_box_pack_start (GTK_BOX (hbox), button_editor->standard_label_radio,
|
||||||
FALSE, FALSE, 2);
|
FALSE, FALSE, 2);
|
||||||
@ -403,7 +403,7 @@ glade_tool_button_editor_new (GladeWidgetAdaptor * adaptor,
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "label-widget", FALSE,
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "label-widget", FALSE,
|
||||||
TRUE);
|
TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
button_editor->custom_label_radio = gtk_radio_button_new_from_widget
|
button_editor->custom_label_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (button_editor->standard_label_radio));
|
(GTK_RADIO_BUTTON (button_editor->standard_label_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button_editor->custom_label_radio, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), button_editor->custom_label_radio, FALSE,
|
||||||
@ -438,7 +438,7 @@ glade_tool_button_editor_new (GladeWidgetAdaptor * adaptor,
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "stock-id", FALSE,
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "stock-id", FALSE,
|
||||||
TRUE);
|
TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
button_editor->stock_radio = gtk_radio_button_new (NULL);
|
button_editor->stock_radio = gtk_radio_button_new (NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button_editor->stock_radio, FALSE, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), button_editor->stock_radio, FALSE, FALSE,
|
||||||
2);
|
2);
|
||||||
@ -451,7 +451,7 @@ glade_tool_button_editor_new (GladeWidgetAdaptor * adaptor,
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "icon-name", FALSE,
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "icon-name", FALSE,
|
||||||
TRUE);
|
TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
button_editor->icon_radio = gtk_radio_button_new_from_widget
|
button_editor->icon_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (button_editor->stock_radio));
|
(GTK_RADIO_BUTTON (button_editor->stock_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button_editor->icon_radio, FALSE, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), button_editor->icon_radio, FALSE, FALSE,
|
||||||
@ -465,7 +465,7 @@ glade_tool_button_editor_new (GladeWidgetAdaptor * adaptor,
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "icon-widget", FALSE,
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "icon-widget", FALSE,
|
||||||
TRUE);
|
TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
button_editor->custom_radio = gtk_radio_button_new_from_widget
|
button_editor->custom_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (button_editor->stock_radio));
|
(GTK_RADIO_BUTTON (button_editor->stock_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button_editor->custom_radio, FALSE, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), button_editor->custom_radio, FALSE, FALSE,
|
||||||
|
@ -248,7 +248,7 @@ glade_tool_item_group_editor_new (GladeWidgetAdaptor *adaptor,
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "label", FALSE,
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "label", FALSE,
|
||||||
TRUE);
|
TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
group_editor->label_radio = gtk_radio_button_new (NULL);
|
group_editor->label_radio = gtk_radio_button_new (NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), group_editor->label_radio, FALSE, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), group_editor->label_radio, FALSE, FALSE,
|
||||||
2);
|
2);
|
||||||
@ -261,7 +261,7 @@ glade_tool_item_group_editor_new (GladeWidgetAdaptor *adaptor,
|
|||||||
eprop =
|
eprop =
|
||||||
glade_widget_adaptor_create_eprop_by_name (adaptor, "label-widget",
|
glade_widget_adaptor_create_eprop_by_name (adaptor, "label-widget",
|
||||||
FALSE, TRUE);
|
FALSE, TRUE);
|
||||||
hbox = gtk_hbox_new (FALSE, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
group_editor->label_widget_radio = gtk_radio_button_new_from_widget
|
group_editor->label_widget_radio = gtk_radio_button_new_from_widget
|
||||||
(GTK_RADIO_BUTTON (group_editor->label_radio));
|
(GTK_RADIO_BUTTON (group_editor->label_radio));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), group_editor->label_widget_radio, FALSE,
|
gtk_box_pack_start (GTK_BOX (hbox), group_editor->label_widget_radio, FALSE,
|
||||||
|
@ -195,11 +195,11 @@ glade_tree_view_editor_new (GladeWidgetAdaptor * adaptor, GladeEditable * embed)
|
|||||||
/* Pack the parent on the left... */
|
/* Pack the parent on the left... */
|
||||||
gtk_box_pack_start (GTK_BOX (view_editor), GTK_WIDGET (embed), TRUE, TRUE, 8);
|
gtk_box_pack_start (GTK_BOX (view_editor), GTK_WIDGET (embed), TRUE, TRUE, 8);
|
||||||
|
|
||||||
separator = gtk_vseparator_new ();
|
separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
|
||||||
gtk_box_pack_start (GTK_BOX (view_editor), separator, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (view_editor), separator, FALSE, FALSE, 0);
|
||||||
|
|
||||||
/* ...and the vbox with datastore/label on the right */
|
/* ...and the vbox with datastore/label on the right */
|
||||||
vbox = gtk_vbox_new (FALSE, 0);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (view_editor), vbox, TRUE, TRUE, 8);
|
gtk_box_pack_start (GTK_BOX (view_editor), vbox, TRUE, TRUE, 8);
|
||||||
|
|
||||||
str = g_strdup_printf ("<b>%s</b>", _("Choose a Data Model and define some\n"
|
str = g_strdup_printf ("<b>%s</b>", _("Choose a Data Model and define some\n"
|
||||||
|
@ -1080,6 +1080,7 @@ embedded in another object</_tooltip>
|
|||||||
<properties>
|
<properties>
|
||||||
<property id="label" default="checkbutton"/>
|
<property id="label" default="checkbutton"/>
|
||||||
<property id="draw-indicator" default="True" save-always="True"/>
|
<property id="draw-indicator" default="True" save-always="True"/>
|
||||||
|
<property id="xalign" save-always="True"/>
|
||||||
</properties>
|
</properties>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ hy
|
|||||||
id
|
id
|
||||||
it
|
it
|
||||||
ja
|
ja
|
||||||
|
km
|
||||||
ko
|
ko
|
||||||
lt
|
lt
|
||||||
lv
|
lv
|
||||||
|
4710
po/ca@valencia.po
4710
po/ca@valencia.po
File diff suppressed because it is too large
Load Diff
7367
po/en_GB.po
7367
po/en_GB.po
File diff suppressed because it is too large
Load Diff
824
po/pt_BR.po
824
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
3964
po/sr@latin.po
3964
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
7289
po/zh_CN.po
7289
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
@ -1543,14 +1543,19 @@ cut_cb (GtkAction * action, GladeWindow * window)
|
|||||||
static void
|
static void
|
||||||
paste_cb (GtkAction * action, GladeWindow * window)
|
paste_cb (GtkAction * action, GladeWindow * window)
|
||||||
{
|
{
|
||||||
|
GtkWidget *placeholder;
|
||||||
GladeProject *project;
|
GladeProject *project;
|
||||||
|
|
||||||
if (!window->priv->active_view)
|
if (!window->priv->active_view)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
project = glade_design_view_get_project (window->priv->active_view);
|
project = glade_design_view_get_project (window->priv->active_view);
|
||||||
|
placeholder = glade_util_get_placeholder_from_pointer (GTK_CONTAINER (window));
|
||||||
|
|
||||||
glade_project_command_paste (project, NULL);
|
/* If this action is activated with a key binging (ctrl-v) the widget will be
|
||||||
|
* pasted over the placeholder below the default pointer.
|
||||||
|
*/
|
||||||
|
glade_project_command_paste (project, placeholder ? GLADE_PLACEHOLDER (placeholder) : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -2574,13 +2579,13 @@ create_notebook_tab (GladeWindow * window, GladeProject * project,
|
|||||||
GtkWidget *tab_label, *ebox, *hbox, *close_button, *label, *dummy_label;
|
GtkWidget *tab_label, *ebox, *hbox, *close_button, *label, *dummy_label;
|
||||||
GtkWidget *progress;
|
GtkWidget *progress;
|
||||||
|
|
||||||
tab_label = gtk_hbox_new (FALSE, 4);
|
tab_label = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
|
|
||||||
ebox = gtk_event_box_new ();
|
ebox = gtk_event_box_new ();
|
||||||
gtk_event_box_set_visible_window (GTK_EVENT_BOX (ebox), FALSE);
|
gtk_event_box_set_visible_window (GTK_EVENT_BOX (ebox), FALSE);
|
||||||
gtk_box_pack_start (GTK_BOX (tab_label), ebox, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (tab_label), ebox, TRUE, TRUE, 0);
|
||||||
|
|
||||||
hbox = gtk_hbox_new (FALSE, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
gtk_container_add (GTK_CONTAINER (ebox), hbox);
|
gtk_container_add (GTK_CONTAINER (ebox), hbox);
|
||||||
|
|
||||||
close_button = glade_close_button_new ();
|
close_button = glade_close_button_new ();
|
||||||
@ -3322,7 +3327,7 @@ glade_window_init (GladeWindow * window)
|
|||||||
|
|
||||||
priv->app = glade_app_new ();
|
priv->app = glade_app_new ();
|
||||||
|
|
||||||
vbox = gtk_vbox_new (FALSE, 0);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||||
|
|
||||||
/* editor */
|
/* editor */
|
||||||
@ -3371,9 +3376,9 @@ glade_window_init (GladeWindow * window)
|
|||||||
redo_action);
|
redo_action);
|
||||||
|
|
||||||
/* main contents */
|
/* main contents */
|
||||||
hpaned1 = gtk_hpaned_new ();
|
hpaned1 = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
hpaned2 = gtk_hpaned_new ();
|
hpaned2 = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
vpaned = gtk_vpaned_new ();
|
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||||
priv->center_pane = hpaned1;
|
priv->center_pane = hpaned1;
|
||||||
priv->left_pane = hpaned2;
|
priv->left_pane = hpaned2;
|
||||||
priv->right_pane = vpaned;
|
priv->right_pane = vpaned;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user