diff options
author | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2020-07-27 19:46:19 -0300 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2020-07-27 20:50:03 -0300 |
commit | 115753c7d9cb52c2b55948af19bf36dc7e417f3a (patch) | |
tree | 6325727881ada941f9f375cd51311836b8c19c13 /gladeui | |
parent | 7a77ded99c30575a417a1f3c7d4ff6e00580daa0 (diff) | |
download | glade-115753c7d9cb52c2b55948af19bf36dc7e417f3a.tar.gz |
GladeProjectProperties: break project circular dependency
Do not use a GtkTreeModelFilter for the template combobox to avoid
adding a circular dependency to the project.
Implement it with a proxy model updated using project add/remove
widget signals.
Diffstat (limited to 'gladeui')
-rw-r--r-- | gladeui/glade-project-properties.c | 236 | ||||
-rw-r--r-- | gladeui/glade-project-properties.ui | 340 |
2 files changed, 352 insertions, 224 deletions
diff --git a/gladeui/glade-project-properties.c b/gladeui/glade-project-properties.c index 2763db04..0c4a16e8 100644 --- a/gladeui/glade-project-properties.c +++ b/gladeui/glade-project-properties.c @@ -1,5 +1,6 @@ /* * Copyright (C) 2013 Tristan Van Berkom. + * 2020 Juan Pablo Ugarte. * * This library is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as @@ -17,6 +18,7 @@ * * Authors: * Tristan Van Berkom <tvb@gnome.org> + * Juan Pablo Ugarte <juanpablougarte@gmail.com> */ #include <config.h> @@ -30,6 +32,7 @@ #include "glade-private.h" /* GObjectClass */ +static void glade_project_properties_dispose (GObject *object); static void glade_project_properties_finalize (GObject *object); static void glade_project_properties_set_property (GObject *object, guint prop_id, @@ -92,9 +95,19 @@ static void project_css_provider_path_changed (GladeProject *p GParamSpec *pspec, GladeProjectProperties *properties); +/* Toplevels model */ +enum +{ + COLUMN_ICON_NAME, + COLUMN_NAME, + COLUMN_ID, + COLUMN_WIDGET +}; + typedef struct { GladeProject *project; + GtkListStore *toplevels; /* Properties */ GtkWidget *project_wide_radio; @@ -167,6 +180,7 @@ glade_project_properties_class_init (GladeProjectPropertiesClass *klass) gobject_class = G_OBJECT_CLASS (klass); widget_class = GTK_WIDGET_CLASS (klass); + gobject_class->dispose = glade_project_properties_dispose; gobject_class->finalize = glade_project_properties_finalize; gobject_class->set_property = glade_project_properties_set_property; @@ -175,7 +189,7 @@ glade_project_properties_class_init (GladeProjectPropertiesClass *klass) g_param_spec_object ("project", _("Project"), _("The project this properties dialog was created for"), GLADE_TYPE_PROJECT, - G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); + G_PARAM_WRITABLE)); /* Setup the template GtkBuilder xml for this class */ @@ -183,6 +197,7 @@ glade_project_properties_class_init (GladeProjectPropertiesClass *klass) /* Define the relationship of the private entry and the entry defined in the xml */ + gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, toplevels); gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, resource_default_radio); gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, resource_relative_radio); gtk_widget_class_bind_template_child_private (widget_class, GladeProjectProperties, resource_fullpath_radio); @@ -228,6 +243,15 @@ glade_project_properties_class_init (GladeProjectPropertiesClass *klass) * GObjectClass * ********************************************************/ static void +glade_project_properties_dispose (GObject *object) +{ + /* Unset project to disconnect callbacks */ + g_object_set (object, "project", NULL, NULL); + + G_OBJECT_CLASS (glade_project_properties_parent_class)->dispose (object); +} + +static void glade_project_properties_finalize (GObject *object) { GladeProjectProperties *properties = GLADE_PROJECT_PROPERTIES (object); @@ -361,15 +385,124 @@ update_prefs_for_resource_path (GladeProjectProperties *properties) } static void +on_project_add_widget (GladeProject *project, + GladeWidget *widget, + GladeProjectProperties *properties) +{ + GladeProjectPropertiesPrivate *priv = GLADE_PROJECT_PROPERTIES_PRIVATE (properties); + GladeWidgetAdaptor *adaptor; + const gchar *name; + GtkTreeIter iter; + + if (glade_widget_get_parent (widget)) + return; + + adaptor = glade_widget_get_adaptor (widget); + name = glade_widget_get_name (widget); + + gtk_list_store_append (priv->toplevels, &iter); + gtk_list_store_set (priv->toplevels, &iter, + COLUMN_ICON_NAME, + glade_widget_adaptor_get_icon_name (adaptor), + COLUMN_NAME, + g_str_has_prefix (name, "__glade_unnamed") ? + glade_widget_adaptor_get_name (adaptor) : name, + COLUMN_ID, + name, + COLUMN_WIDGET, + widget, + -1); +} + +static gboolean +get_iter_by_widget (GtkTreeModel *model, GladeWidget *widget, GtkTreeIter *iter) +{ + gboolean valid = gtk_tree_model_get_iter_first (model, iter); + + while (valid) + { + GladeWidget *gwidget; + + gtk_tree_model_get (model, iter, COLUMN_WIDGET, &gwidget, -1); + g_object_unref (gwidget); + + if (widget == gwidget) + return TRUE; + + valid = gtk_tree_model_iter_next (model, iter); + } + + return FALSE; +} + +static void +on_project_remove_widget (GladeProject *project, + GladeWidget *widget, + GladeProjectProperties *properties) +{ + GladeProjectPropertiesPrivate *priv = GLADE_PROJECT_PROPERTIES_PRIVATE (properties); + GtkTreeIter iter; + + if (glade_widget_get_parent (widget)) + return; + + if (get_iter_by_widget (GTK_TREE_MODEL (priv->toplevels), widget, &iter)) + gtk_list_store_remove (priv->toplevels, &iter); +} + +static void +on_project_widget_name_change (GladeProject *project, + GladeWidget *widget, + GladeProjectProperties *properties) +{ + GladeProjectPropertiesPrivate *priv = GLADE_PROJECT_PROPERTIES_PRIVATE (properties); + GtkTreeIter iter; + + if (glade_widget_get_parent (widget)) + return; + + if (get_iter_by_widget (GTK_TREE_MODEL (priv->toplevels), widget, &iter)) + { + GladeWidgetAdaptor *adaptor = glade_widget_get_adaptor (widget); + const gchar *name = glade_widget_get_name (widget); + + gtk_list_store_set (priv->toplevels, &iter, + COLUMN_NAME, + g_str_has_prefix (name, "__glade_unnamed") ? + glade_widget_adaptor_get_name (adaptor) : name, + COLUMN_ID, + name, + -1); + } +} + +static void glade_project_properties_set_project (GladeProjectProperties *properties, GladeProject *project) { GladeProjectPropertiesPrivate *priv = GLADE_PROJECT_PROPERTIES_PRIVATE(properties); +#define PROJECT_DISCONNECT(func) g_signal_handlers_disconnect_by_func (priv->project, G_CALLBACK (func), properties) + + if (priv->project) + { + PROJECT_DISCONNECT (project_resource_path_changed); + PROJECT_DISCONNECT (project_template_changed); + PROJECT_DISCONNECT (project_domain_changed); + PROJECT_DISCONNECT (project_css_provider_path_changed); + PROJECT_DISCONNECT (project_targets_changed); + PROJECT_DISCONNECT (project_license_changed); + PROJECT_DISCONNECT (on_project_add_widget); + PROJECT_DISCONNECT (on_project_remove_widget); + PROJECT_DISCONNECT (on_project_widget_name_change); + } + /* No strong reference, we belong to the project */ - g_assert (priv->project == NULL); priv->project = project; + if (!priv->project) + return; + g_signal_connect (priv->project, "notify::resource-path", G_CALLBACK (project_resource_path_changed), properties); g_signal_connect (priv->project, "notify::template", @@ -377,11 +510,17 @@ glade_project_properties_set_project (GladeProjectProperties *properties, g_signal_connect (priv->project, "notify::translation-domain", G_CALLBACK (project_domain_changed), properties); g_signal_connect (priv->project, "notify::css-provider-path", - G_CALLBACK (project_css_provider_path_changed), properties); + G_CALLBACK (project_css_provider_path_changed), properties); g_signal_connect (priv->project, "targets-changed", G_CALLBACK (project_targets_changed), properties); g_signal_connect (priv->project, "notify::license", G_CALLBACK (project_license_changed), properties); + g_signal_connect (priv->project, "add-widget", + G_CALLBACK (on_project_add_widget), properties); + g_signal_connect (priv->project, "remove-widget", + G_CALLBACK (on_project_remove_widget), properties); + g_signal_connect (priv->project, "widget-name-changed", + G_CALLBACK (on_project_widget_name_change), properties); target_version_box_fill (properties); update_prefs_for_resource_path (properties); @@ -531,12 +670,11 @@ on_template_combo_box_changed (GtkComboBox *combo, if (gtk_combo_box_get_active_iter (combo, &iter)) { GladeWidget *gwidget; - GObject *object; gtk_tree_model_get (gtk_combo_box_get_model (combo), &iter, - GLADE_PROJECT_MODEL_COLUMN_OBJECT, &object, -1); - - gwidget = glade_widget_get_from_gobject (object); + COLUMN_WIDGET, &gwidget, + -1); + g_object_unref (gwidget); glade_command_set_project_template (priv->project, gwidget); } @@ -578,40 +716,6 @@ on_template_checkbutton_toggled (GtkToggleButton *togglebutton, glade_command_set_project_template (priv->project, NULL); } -static gboolean -template_visible_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer data) -{ - GtkTreeIter parent; - gboolean visible; - GObject *object; - - visible = !gtk_tree_model_iter_parent (model, &parent, iter); - - if (visible) - { - gtk_tree_model_get (model, iter, - GLADE_PROJECT_MODEL_COLUMN_OBJECT, &object, - -1); - - visible = GTK_IS_WIDGET (object); - g_object_unref (object); - } - - return visible; -} - -static GtkTreeModel * -glade_project_toplevel_model_filter_new (GladeProjectProperties *properties) -{ - GladeProjectPropertiesPrivate *priv = GLADE_PROJECT_PROPERTIES_PRIVATE(properties); - GtkTreeModel *model; - - model = gtk_tree_model_filter_new (GTK_TREE_MODEL (priv->project), NULL); - gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (model), - template_visible_func, NULL, NULL); - return model; -} - static void verify_clicked (GtkWidget *button, GladeProjectProperties *properties) { @@ -930,6 +1034,9 @@ on_glade_project_properties_hide (GtkWidget *widget, GtkTextIter start, end; gchar *license; + if (!priv->project) + return; + gtk_text_buffer_get_bounds (priv->license_textbuffer, &start, &end); license = gtk_text_buffer_get_text (priv->license_textbuffer, &start, &end, FALSE); g_strstrip (license); @@ -1045,52 +1152,25 @@ project_template_changed (GladeProject *project, GladeProjectProperties *properties) { GladeProjectPropertiesPrivate *priv = GLADE_PROJECT_PROPERTIES_PRIVATE(properties); - GtkTreeModel *model; - GtkTreeIter iter; - gboolean valid; - gboolean template_found = FALSE; + GladeWidget *gwidget; priv->ignore_ui_cb = TRUE; - model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->template_combobox)); - if (!model) + if ((gwidget = glade_project_get_template (priv->project))) { - model = glade_project_toplevel_model_filter_new (properties); + gtk_combo_box_set_active_id (GTK_COMBO_BOX (priv->template_combobox), + glade_widget_get_name (gwidget)); - gtk_combo_box_set_model (GTK_COMBO_BOX (priv->template_combobox), model); - g_object_unref (model); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->template_checkbutton), TRUE); + gtk_widget_set_sensitive (priv->template_combobox, TRUE); } - - valid = gtk_tree_model_get_iter_first (model, &iter); - while (valid) + else { - GladeWidget *gwidget; - GObject *obj; - - gtk_tree_model_get (model, &iter, - GLADE_PROJECT_MODEL_COLUMN_OBJECT, &obj, - -1); - - gwidget = glade_widget_get_from_gobject (obj); - g_object_unref (obj); - - if (gwidget == glade_project_get_template (priv->project)) - { - gtk_combo_box_set_active_iter (GTK_COMBO_BOX (priv->template_combobox), &iter); - - template_found = TRUE; - break; - } - - valid = gtk_tree_model_iter_next (model, &iter); + gtk_combo_box_set_active_id (GTK_COMBO_BOX (priv->template_combobox), NULL); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->template_checkbutton), FALSE); + gtk_widget_set_sensitive (priv->template_combobox, FALSE); } - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->template_checkbutton), template_found); - gtk_widget_set_sensitive (priv->template_combobox, template_found); - - if (!template_found && gtk_combo_box_get_model (GTK_COMBO_BOX (priv->template_combobox))) - gtk_combo_box_set_active_iter (GTK_COMBO_BOX (priv->template_combobox), NULL); - priv->ignore_ui_cb = FALSE; } diff --git a/gladeui/glade-project-properties.ui b/gladeui/glade-project-properties.ui index a04798ea..f27bd925 100644 --- a/gladeui/glade-project-properties.ui +++ b/gladeui/glade-project-properties.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.2 +<!-- Generated with glade 3.37.0 libgladeui - Glade UI Designer core library Copyright (C) 2013 Tristan Van Berkom <tvb@gnome.org> @@ -48,34 +48,43 @@ Authors: <object class="GtkEntryBuffer" id="description_entrybuffer"/> <object class="GtkTextBuffer" id="license_textbuffer"/> <object class="GtkEntryBuffer" id="name_entrybuffer"/> + <object class="GtkListStore" id="toplevels"> + <columns> + <!-- column-name icon-name --> + <column type="gchararray"/> + <!-- column-name name --> + <column type="gchararray"/> + <!-- column-name id --> + <column type="gchararray"/> + <!-- column-name widget --> + <column type="GObject"/> + </columns> + </object> <template class="GladeProjectProperties" parent="GtkDialog"> - <property name="can_focus">False</property> - <property name="border_width">5</property> - <property name="type_hint">dialog</property> + <property name="can-focus">False</property> + <property name="border-width">5</property> + <property name="type-hint">dialog</property> <signal name="delete-event" handler="gtk_widget_hide_on_delete" swapped="no"/> <signal name="hide" handler="on_glade_project_properties_hide" swapped="no"/> <signal name="response" handler="gtk_widget_hide" swapped="no"/> - <child type="titlebar"> - <placeholder/> - </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="orientation">vertical</property> <property name="spacing">4</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="dialog-action_area1"> - <property name="can_focus">False</property> - <property name="layout_style">end</property> + <property name="can-focus">False</property> + <property name="layout-style">end</property> <child> <object class="GtkButton" id="verify_button"> <property name="label" translatable="yes">_Verify</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip_text" translatable="yes">Verify that the project does not use any properties, + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="tooltip-text" translatable="yes">Verify that the project does not use any properties, signals or widgets which are not available in the target version</property> - <property name="use_underline">True</property> + <property name="use-underline">True</property> <signal name="clicked" handler="verify_clicked" swapped="no"/> </object> <packing> @@ -89,9 +98,9 @@ signals or widgets which are not available in the target version</property> <object class="GtkButton" id="close_button"> <property name="label">_Close</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_stock">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="use-underline">True</property> </object> <packing> <property name="expand">False</property> @@ -103,68 +112,71 @@ signals or widgets which are not available in the target version</property> <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="pack_type">end</property> + <property name="pack-type">end</property> <property name="position">6</property> </packing> </child> <child> <object class="GtkNotebook" id="notebook"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <child> <object class="GtkBox" id="box1"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="border_width">5</property> + <property name="can-focus">False</property> + <property name="border-width">5</property> <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkFrame" id="frame1"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="grid2"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">12</property> - <property name="margin_top">6</property> - <property name="row_spacing">4</property> - <property name="column_spacing">4</property> - <property name="row_homogeneous">True</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-top">6</property> + <property name="row-spacing">4</property> + <property name="column-spacing">4</property> + <property name="row-homogeneous">True</property> <child> <object class="GtkLabel" id="label1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="halign">start</property> <property name="label" translatable="yes">Translation domain:</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkEntry" id="domain_entry"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> - <property name="invisible_char">●</property> + <property name="invisible-char">●</property> <signal name="changed" handler="on_domain_entry_changed" swapped="no"/> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkComboBox" id="template_combobox"> <property name="visible">True</property> <property name="sensitive">False</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> + <property name="model">toplevels</property> + <property name="id-column">2</property> <signal name="changed" handler="on_template_combo_box_changed" swapped="no"/> <child> <object class="GtkCellRendererPixbuf" id="cellrenderertext1"/> @@ -180,53 +192,62 @@ signals or widgets which are not available in the target version</property> </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkCheckButton" id="template_checkbutton"> <property name="label" translatable="yes">Composite template toplevel:</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> <property name="halign">start</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <signal name="toggled" handler="on_template_checkbutton_toggled" swapped="no"/> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkFileChooserButton" id="css_filechooser"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="filter">css_filter</property> <property name="title" translatable="yes">Select a CSS to use as custom style provider</property> <signal name="file-set" handler="on_css_filechooser_file_set" swapped="no"/> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="left-attach">1</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkCheckButton" id="css_checkbutton"> <property name="label" translatable="yes">Custom CSS style provider:</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> <property name="halign">start</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <signal name="toggled" handler="on_css_checkbutton_toggled" swapped="no"/> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="left-attach">0</property> + <property name="top-attach">2</property> </packing> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> </child> <child type="label_item"> @@ -242,31 +263,32 @@ signals or widgets which are not available in the target version</property> <child> <object class="GtkFrame" id="frame2"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">12</property> - <property name="margin_top">6</property> - <property name="row_spacing">4</property> - <property name="column_spacing">4</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-top">6</property> + <property name="row-spacing">4</property> + <property name="column-spacing">4</property> <child> <object class="GtkRadioButton" id="resource_default_radio"> <property name="label" translatable="yes">From the project directory</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> <property name="halign">start</property> <property name="active">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <signal name="toggled" handler="resource_default_toggled" swapped="no"/> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> <property name="width">2</property> </packing> </child> @@ -274,70 +296,79 @@ signals or widgets which are not available in the target version</property> <object class="GtkRadioButton" id="resource_relative_radio"> <property name="label" translatable="yes">From a project relative directory</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> <property name="halign">start</property> <property name="active">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <property name="group">resource_default_radio</property> <signal name="toggled" handler="resource_relative_toggled" swapped="no"/> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkRadioButton" id="resource_fullpath_radio"> <property name="label" translatable="yes">From this directory</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> <property name="halign">start</property> <property name="active">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <property name="group">resource_default_radio</property> <signal name="toggled" handler="resource_fullpath_toggled" swapped="no"/> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="left-attach">0</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkFileChooserButton" id="full_path_button"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="action">select-folder</property> <property name="title" translatable="yes">Choose a path to load image resources</property> <signal name="file-set" handler="resource_full_path_set" swapped="no"/> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="left-attach">1</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkEntry" id="relative_path_entry"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> - <property name="invisible_char">●</property> + <property name="invisible-char">●</property> <signal name="changed" handler="on_relative_path_entry_changed" swapped="no"/> <signal name="insert-text" handler="on_relative_path_entry_insert_text" swapped="no"/> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> </child> <child type="label"> <object class="GtkLabel" id="label2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes">Image resources are loaded locally:</property> <attributes> <attribute name="weight" value="bold"/> @@ -354,17 +385,18 @@ signals or widgets which are not available in the target version</property> <child> <object class="GtkFrame" id="frame3"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="toolkit_grid"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">12</property> - <property name="margin_top">6</property> - <property name="row_spacing">4</property> - <property name="column_spacing">4</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-top">6</property> + <property name="row-spacing">4</property> + <property name="column-spacing">4</property> <child> <placeholder/> </child> @@ -397,7 +429,7 @@ signals or widgets which are not available in the target version</property> <child type="label"> <object class="GtkLabel" id="label3"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes">Toolkit version required:</property> <attributes> <attribute name="weight" value="bold"/> @@ -416,162 +448,163 @@ signals or widgets which are not available in the target version</property> <child type="tab"> <object class="GtkLabel" id="label5"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes">Properties</property> - <property name="use_markup">True</property> + <property name="use-markup">True</property> <attributes> <attribute name="weight" value="bold"/> </attributes> </object> <packing> - <property name="tab_fill">False</property> + <property name="tab-fill">False</property> </packing> </child> <child> <object class="GtkBox" id="box3"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">12</property> - <property name="margin_right">6</property> - <property name="margin_top">6</property> - <property name="margin_bottom">6</property> + <property name="can-focus">False</property> + <property name="margin-start">12</property> + <property name="margin-end">6</property> + <property name="margin-top">6</property> + <property name="margin-bottom">6</property> <property name="orientation">vertical</property> <property name="spacing">6</property> <child> + <!-- n-columns=3 n-rows=5 --> <object class="GtkGrid" id="grid3"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> + <property name="can-focus">False</property> + <property name="row-spacing">6</property> + <property name="column-spacing">6</property> <child> <object class="GtkLabel" id="label7"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes">Name:</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkLabel" id="label8"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes">Copyright:</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="left-attach">0</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkEntry" id="name_entry"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="buffer">name_entrybuffer</property> - <property name="placeholder_text" translatable="yes">program or library name</property> + <property name="placeholder-text" translatable="yes">program or library name</property> <signal name="changed" handler="on_license_data_changed" swapped="yes"/> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkLabel" id="label9"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes">Author(s):</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> + <property name="left-attach">0</property> + <property name="top-attach">3</property> </packing> </child> <child> <object class="GtkLabel" id="label6"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes">License:</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">4</property> + <property name="left-attach">0</property> + <property name="top-attach">4</property> </packing> </child> <child> <object class="GtkScrolledWindow" id="scrolledwindow2"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="shadow_type">in</property> + <property name="can-focus">True</property> + <property name="shadow-type">in</property> <child> <object class="GtkTextView" id="copyright_textview"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="buffer">copyright_textbuffer</property> </object> </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="left-attach">1</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkScrolledWindow" id="scrolledwindow3"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="shadow_type">in</property> + <property name="can-focus">True</property> + <property name="shadow-type">in</property> <child> <object class="GtkTextView" id="authors_textview"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="buffer">authors_textbuffer</property> </object> </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">3</property> + <property name="left-attach">1</property> + <property name="top-attach">3</property> </packing> </child> <child> <object class="GtkLabel" id="label10"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes">Description:</property> - <property name="max_width_chars">5</property> + <property name="max-width-chars">5</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkEntry" id="description_entry"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="buffer">description_entrybuffer</property> - <property name="placeholder_text" translatable="yes">program or library short description</property> + <property name="placeholder-text" translatable="yes">program or library short description</property> <signal name="changed" handler="on_license_data_changed" swapped="yes"/> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkComboBoxText" id="license_comboboxtext"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="active">0</property> <items> <item id="other" translatable="yes">Other</item> @@ -588,10 +621,25 @@ signals or widgets which are not available in the target version</property> <signal name="changed" handler="on_license_comboboxtext_changed" swapped="no"/> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">4</property> + <property name="left-attach">1</property> + <property name="top-attach">4</property> </packing> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="expand">False</property> @@ -602,14 +650,14 @@ signals or widgets which are not available in the target version</property> <child> <object class="GtkScrolledWindow" id="scrolledwindow1"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="shadow_type">in</property> + <property name="shadow-type">in</property> <child> <object class="GtkTextView" id="license_textview"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="editable">False</property> @@ -631,7 +679,7 @@ signals or widgets which are not available in the target version</property> <child type="tab"> <object class="GtkLabel" id="label4"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes">License</property> <attributes> <attribute name="weight" value="bold"/> @@ -639,7 +687,7 @@ signals or widgets which are not available in the target version</property> </object> <packing> <property name="position">1</property> - <property name="tab_fill">False</property> + <property name="tab-fill">False</property> </packing> </child> </object> |