[anjuta] project-manager: Use a GtkFileChooser to add sources in a target
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] project-manager: Use a GtkFileChooser to add sources in a target
- Date: Sat, 7 Jan 2012 20:33:21 +0000 (UTC)
commit 3d547da812fbf9764311cd9d9148cd9333fa61d3
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Sat Jan 7 21:26:25 2012 +0100
project-manager: Use a GtkFileChooser to add sources in a target
plugins/project-manager/dialogs.c | 146 ++++++++++++-
plugins/project-manager/dialogs.h | 1 +
plugins/project-manager/plugin.c | 50 +++--
plugins/project-manager/pm_dialogs.ui | 382 ++++++++++++++++++++++++---------
4 files changed, 453 insertions(+), 126 deletions(-)
---
diff --git a/plugins/project-manager/dialogs.c b/plugins/project-manager/dialogs.c
index cf33d98..23cb0a0 100644
--- a/plugins/project-manager/dialogs.c
+++ b/plugins/project-manager/dialogs.c
@@ -1012,7 +1012,7 @@ anjuta_pm_project_new_group (ProjectManagerPlugin *plugin, GtkWindow *parent, Gt
AnjutaProjectNode*
anjuta_pm_project_new_source (ProjectManagerPlugin *plugin,
- GtkWindow *parent,
+ GtkWindow *parent,
GtkTreeIter *default_parent,
const gchar *default_uri)
{
@@ -1041,6 +1041,146 @@ anjuta_pm_project_new_source (ProjectManagerPlugin *plugin,
return NULL;
}
+static void
+on_target_changed (GtkWidget *chooser, GtkWidget *button)
+{
+ GFile *file;
+
+ file = ianjuta_project_chooser_get_selected (IANJUTA_PROJECT_CHOOSER (chooser), NULL);
+ gtk_widget_set_sensitive (button, file != NULL);
+}
+
+GList*
+anjuta_pm_add_source_dialog (ProjectManagerPlugin *plugin,
+ GtkWindow *top_window,
+ GtkTreeIter *default_target,
+ GFile *default_source)
+{
+ GtkBuilder *gui;
+ GtkWidget *dialog;
+ GtkWidget *ok_button;
+ GtkWidget *target_chooser;
+ GtkWidget *source_chooser;
+ gint response;
+ gboolean finished = FALSE;
+ GList *sources = NULL;
+
+ g_return_val_if_fail (plugin->project != NULL, NULL);
+
+ gui = load_interface ("add_source_dialog");
+ g_return_val_if_fail (gui != NULL, NULL);
+
+ /* get all needed widgets */
+ dialog = GTK_WIDGET (gtk_builder_get_object (gui, "add_source_dialog"));
+ target_chooser = GTK_WIDGET (gtk_builder_get_object (gui, "target_chooser"));
+ source_chooser = GTK_WIDGET (gtk_builder_get_object (gui, "source_chooser"));
+ ok_button = GTK_WIDGET (gtk_builder_get_object (gui, "ok_add_source_button"));
+
+ /* Fill target selection */
+ ianjuta_project_chooser_set_project_model (IANJUTA_PROJECT_CHOOSER (target_chooser),
+ IANJUTA_PROJECT_MANAGER (plugin),
+ ANJUTA_PROJECT_SOURCE,
+ NULL);
+ if (default_target != NULL)
+ {
+ GtkTreeIter iter;
+ if (pm_convert_project_iter_to_model_iter (GTK_TREE_MODEL (anjuta_tree_combo_box_get_model (ANJUTA_TREE_COMBO_BOX (target_chooser))),
+ &iter, default_target))
+ {
+ anjuta_tree_combo_box_set_active_iter (ANJUTA_TREE_COMBO_BOX (target_chooser), &iter);
+ }
+ }
+ g_signal_connect (target_chooser, "changed",
+ G_CALLBACK (on_target_changed),
+ ok_button);
+ on_target_changed (target_chooser, ok_button);
+
+ /* Selected default file */
+ if (default_source != NULL) gtk_file_chooser_set_file (GTK_FILE_CHOOSER (source_chooser), default_source, NULL);
+
+ if (top_window) {
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), top_window);
+ }
+
+ /* execute dialog */
+ while (!finished) {
+ response = gtk_dialog_run (GTK_DIALOG (dialog));
+
+ switch (response)
+ {
+ case GTK_RESPONSE_OK:
+ {
+ GFile *target_file;
+ AnjutaProjectNode *target;
+ GSList *files;
+
+ target_file = ianjuta_project_chooser_get_selected (IANJUTA_PROJECT_CHOOSER (target_chooser), NULL);
+ target = gbf_project_view_get_node_from_file (plugin->view, ANJUTA_PROJECT_UNKNOWN, target_file);
+ files = gtk_file_chooser_get_files (GTK_FILE_CHOOSER (source_chooser));
+ if ((target != NULL) && (files != NULL))
+ {
+ GString *err_mesg = g_string_new (NULL);
+ GSList *item;
+
+ for (item = files; item != NULL; item = g_slist_next (item))
+ {
+ gchar *path = g_file_get_path ((GFile *)item->data);
+ GError *err = NULL;
+ AnjutaProjectNode *node;
+
+ node = anjuta_pm_project_add_source (plugin->project,
+ target,
+ NULL,
+ path,
+ &err);
+ sources = g_list_prepend (sources, node);
+ if (err) {
+ gchar *str = g_strdup_printf ("%s: %s\n",
+ path,
+ err->message);
+ g_string_append (err_mesg, str);
+ g_error_free (err);
+ g_free (str);
+ }
+ g_free (path);
+ }
+ if (err_mesg->str && strlen (err_mesg->str) > 0)
+ {
+ error_dialog (top_window, _("Cannot add source files"),
+ "%s", err_mesg->str);
+ }
+ else {
+ finished = TRUE;
+ }
+ g_string_free (err_mesg, TRUE);
+ g_slist_foreach (files, (GFunc)g_object_unref, NULL);
+ g_slist_free (files);
+ }
+ else
+ {
+ error_dialog (top_window, _("Cannot add source files"),
+ "%s", _("The selected node cannot contain source files."));
+ }
+ break;
+ }
+ case GTK_RESPONSE_HELP:
+ anjuta_util_help_display (GTK_WIDGET (dialog), ANJUTA_MANUAL, ADD_SOURCE_HELP);
+ break;
+ default:
+ finished = TRUE;
+ break;
+ }
+ }
+
+ /* destroy stuff */
+ gtk_widget_destroy (dialog);
+ g_object_unref (gui);
+
+ sources = g_list_reverse (sources);
+ return sources;
+}
+
+
GList*
anjuta_pm_project_new_multiple_source (ProjectManagerPlugin *plugin,
GtkWindow *top_window,
@@ -1062,11 +1202,11 @@ anjuta_pm_project_new_multiple_source (ProjectManagerPlugin *plugin,
g_return_val_if_fail (plugin->project != NULL, NULL);
- gui = load_interface ("add_source_dialog");
+ gui = load_interface ("new_source_dialog");
g_return_val_if_fail (gui != NULL, NULL);
/* get all needed widgets */
- dialog = GTK_WIDGET (gtk_builder_get_object (gui, "add_source_dialog"));
+ dialog = GTK_WIDGET (gtk_builder_get_object (gui, "new_source_dialog"));
targets_view = GTK_WIDGET (gtk_builder_get_object (gui, "targets_view"));
source_file_tree = GTK_WIDGET (gtk_builder_get_object (gui, "source_file_tree"));
browse_button = GTK_WIDGET (gtk_builder_get_object (gui, "browse_button"));
diff --git a/plugins/project-manager/dialogs.h b/plugins/project-manager/dialogs.h
index c65cd3e..5fbd607 100644
--- a/plugins/project-manager/dialogs.h
+++ b/plugins/project-manager/dialogs.h
@@ -31,6 +31,7 @@ G_BEGIN_DECLS
AnjutaProjectNode* anjuta_pm_project_new_group (ProjectManagerPlugin *plugin, GtkWindow *parent, GtkTreeIter *default_parent, const gchar *name);
AnjutaProjectNode* anjuta_pm_project_new_target (ProjectManagerPlugin *plugin, GtkWindow *parent, GtkTreeIter *default_group, const gchar *name);
AnjutaProjectNode* anjuta_pm_project_new_source (ProjectManagerPlugin *plugin, GtkWindow *parent, GtkTreeIter *default_parent, const gchar *name);
+GList* anjuta_pm_add_source_dialog (ProjectManagerPlugin *plugin, GtkWindow *parent, GtkTreeIter *default_target, GFile *default_source);
GList* anjuta_pm_project_new_multiple_source (ProjectManagerPlugin *plugin, GtkWindow *parent, GtkTreeIter *default_parent, GList *name);
GList* anjuta_pm_project_new_module (ProjectManagerPlugin *plugin, GtkWindow *parent, GtkTreeIter *default_target, const gchar *default_module);
GList* anjuta_pm_project_new_package (ProjectManagerPlugin *plugin, GtkWindow *parent, GtkTreeIter *default_module, GList *packages_to_add);
diff --git a/plugins/project-manager/plugin.c b/plugins/project-manager/plugin.c
index 463a72a..00a8d25 100644
--- a/plugins/project-manager/plugin.c
+++ b/plugins/project-manager/plugin.c
@@ -512,24 +512,24 @@ on_new_target (GtkAction *action, ProjectManagerPlugin *plugin)
static void
on_add_source (GtkAction *action, ProjectManagerPlugin *plugin)
{
- GFile *default_group = NULL;
- gchar *source_uri = NULL;
- GFile *source;
+ GList *new_sources;
+ GFile *default_source = NULL;
+ GtkTreeIter selected;
+ gboolean found;
if (plugin->current_editor_uri)
{
- gchar *uri = g_path_get_dirname (plugin->current_editor_uri);
- default_group = g_file_new_for_uri (uri);
- g_free (uri);
- source_uri = plugin->current_editor_uri;
+ default_source = g_file_new_for_uri (plugin->current_editor_uri);
}
- source =
- ianjuta_project_manager_add_source (IANJUTA_PROJECT_MANAGER (plugin),
- source_uri,
- default_group, NULL);
-
- if (source != NULL) g_object_unref (source);
- if (default_group != NULL) g_object_unref (default_group);
+ found = gbf_project_view_get_first_selected (plugin->view, &selected) != NULL;
+ update_operation_begin (plugin);
+ new_sources = anjuta_pm_add_source_dialog (plugin,
+ get_plugin_parent_window (plugin),
+ found ? &selected : NULL,
+ default_source);
+ update_operation_end (plugin, TRUE);
+ g_list_free (new_sources);
+ if (default_source) g_object_unref (default_source);
}
static void
@@ -616,17 +616,25 @@ on_popup_new_target (GtkAction *action, ProjectManagerPlugin *plugin)
static void
on_popup_add_source (GtkAction *action, ProjectManagerPlugin *plugin)
{
- GtkTreeIter selected_target;
- AnjutaProjectNode *new_source;
+ GList *new_sources;
+ GFile *default_source = NULL;
+ GtkTreeIter selected;
+ gboolean found;
+ if (plugin->current_editor_uri)
+ {
+ default_source = g_file_new_for_uri (plugin->current_editor_uri);
+ }
+ found = gbf_project_view_get_first_selected (plugin->view, &selected) != NULL;
update_operation_begin (plugin);
- gbf_project_view_get_first_selected (plugin->view, &selected_target);
-
- new_source = anjuta_pm_project_new_source (plugin,
- get_plugin_parent_window (plugin),
- &selected_target, NULL);
+ new_sources = anjuta_pm_add_source_dialog (plugin,
+ get_plugin_parent_window (plugin),
+ found ? &selected : NULL,
+ default_source);
update_operation_end (plugin, TRUE);
+ g_list_free (new_sources);
+ if (default_source) g_object_unref (default_source);
}
static gboolean
diff --git a/plugins/project-manager/pm_dialogs.ui b/plugins/project-manager/pm_dialogs.ui
index b1c4716..e52cd27 100644
--- a/plugins/project-manager/pm_dialogs.ui
+++ b/plugins/project-manager/pm_dialogs.ui
@@ -99,6 +99,10 @@
<child>
<object class="GbfProjectView" id="module_targets_view">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="view-selection1"/>
+ </child>
</object>
</child>
</object>
@@ -129,6 +133,10 @@
<child>
<object class="GbfProjectView" id="modules_view">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="view-selection2"/>
+ </child>
</object>
</child>
</object>
@@ -391,23 +399,23 @@
<property name="border_width">5</property>
<property name="title" translatable="yes">Add Source</property>
<property name="modal">True</property>
- <property name="default_width">400</property>
+ <property name="default_width">700</property>
<property name="default_height">550</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
- <object class="GtkBox" id="vbox6">
+ <object class="GtkBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
- <property name="spacing">2</property>
+ <property name="spacing">6</property>
<child internal-child="action_area">
- <object class="GtkButtonBox" id="hbuttonbox2">
+ <object class="GtkButtonBox" id="hbuttonbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="help_button">
+ <object class="GtkButton" id="help_button1">
<property name="label">gtk-help</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -424,7 +432,7 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="button4">
+ <object class="GtkButton" id="button2">
<property name="label">gtk-cancel</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -442,7 +450,7 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="ok_source_button">
+ <object class="GtkButton" id="ok_add_source_button">
<property name="label">gtk-add</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -469,120 +477,61 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox7">
+ <object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="spacing">12</property>
<child>
- <object class="GtkVBox" id="vbox8">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label8">
+ <object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Select the _target for the new source files:</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes">Target:</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkScrolledWindow" id="targets_ph">
+ <object class="AnjutaPmChooserButton" id="target_chooser">
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GbfProjectView" id="targets_view">
- <property name="visible">True</property>
- </object>
- </child>
+ <property name="receives_default">True</property>
+ <property name="valign">start</property>
+ <property name="hexpand">True</property>
+ <property name="use_action_appearance">False</property>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkTable" id="table2">
+ <object class="GtkFileChooserWidget" id="source_chooser">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">etched-in</property>
- <child>
- <object class="GtkTreeView" id="source_file_tree">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="fixed_height_mode">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection1"/>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_padding">5</property>
- <property name="y_padding">5</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="browse_button">
- <property name="label" translatable="yes">_Select file to addâ</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- <property name="x_padding">5</property>
- <property name="y_padding">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Source files:</property>
- </object>
- <packing>
- <property name="y_options"></property>
- <property name="x_padding">5</property>
- <property name="y_padding">2</property>
- </packing>
- </child>
+ <property name="orientation">vertical</property>
+ <property name="preview_widget_active">False</property>
+ <property name="select_multiple">True</property>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
@@ -597,9 +546,9 @@
</object>
</child>
<action-widgets>
- <action-widget response="-11">help_button</action-widget>
- <action-widget response="-6">button4</action-widget>
- <action-widget response="-5">ok_source_button</action-widget>
+ <action-widget response="-11">help_button1</action-widget>
+ <action-widget response="-6">button2</action-widget>
+ <action-widget response="-5">ok_add_source_button</action-widget>
</action-widgets>
</object>
<object class="GtkDialog" id="new_group_dialog">
@@ -667,7 +616,7 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -678,7 +627,7 @@
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Directory name:</property>
@@ -712,12 +661,12 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label2">
+ <object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@@ -738,6 +687,10 @@
<child>
<object class="GbfProjectView" id="groups_view">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="view-selection5"/>
+ </child>
</object>
</child>
</object>
@@ -768,6 +721,227 @@
<action-widget response="-5">ok_group_button</action-widget>
</action-widgets>
</object>
+ <object class="GtkDialog" id="new_source_dialog">
+ <property name="can_focus">False</property>
+ <property name="can_default">True</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Add Source</property>
+ <property name="modal">True</property>
+ <property name="default_width">400</property>
+ <property name="default_height">550</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="vbox6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="hbuttonbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="help_button">
+ <property name="label">gtk-help</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button4">
+ <property name="label">gtk-cancel</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="ok_source_button">
+ <property name="label">gtk-add</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkVBox" id="vbox8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Select the _target for the new source files:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="targets_ph">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GbfProjectView" id="targets_view">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="view-selection3"/>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="shadow_type">etched-in</property>
+ <child>
+ <object class="GtkTreeView" id="source_file_tree">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="fixed_height_mode">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_padding">5</property>
+ <property name="y_padding">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="browse_button">
+ <property name="label" translatable="yes">_Select file to addâ</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ <property name="x_padding">5</property>
+ <property name="y_padding">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Source files:</property>
+ </object>
+ <packing>
+ <property name="y_options"></property>
+ <property name="x_padding">5</property>
+ <property name="y_padding">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-11">help_button</action-widget>
+ <action-widget response="-6">button4</action-widget>
+ <action-widget response="-5">ok_source_button</action-widget>
+ </action-widgets>
+ </object>
<object class="GtkDialog" id="new_target_dialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -777,13 +951,13 @@
<property name="default_height">450</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
- <object class="GtkBox" id="vbox3">
+ <object class="GtkBox" id="vbox13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
- <object class="GtkButtonBox" id="hbuttonbox1">
+ <object class="GtkButtonBox" id="hbuttonbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
@@ -805,7 +979,7 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="button2">
+ <object class="GtkButton" id="button7">
<property name="label">gtk-cancel</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -848,13 +1022,13 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox4">
+ <object class="GtkVBox" id="vbox14">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="spacing">12</property>
<child>
- <object class="GtkTable" id="table1">
+ <object class="GtkTable" id="table4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
@@ -908,7 +1082,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label3">
+ <object class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@@ -929,12 +1103,12 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox5">
+ <object class="GtkVBox" id="vbox15">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label4">
+ <object class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@@ -955,6 +1129,10 @@
<child>
<object class="GbfProjectView" id="target_groups_view">
<property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="view-selection6"/>
+ </child>
</object>
</child>
</object>
@@ -982,7 +1160,7 @@
</child>
<action-widgets>
<action-widget response="-11">button5</action-widget>
- <action-widget response="-6">button2</action-widget>
+ <action-widget response="-6">button7</action-widget>
<action-widget response="-5">ok_target_button</action-widget>
</action-widgets>
</object>
@@ -1038,7 +1216,7 @@
</packing>
</child>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow3">
+ <object class="GtkScrolledWindow" id="scrolledwindow4">
<property name="width_request">600</property>
<property name="height_request">144</property>
<property name="visible">True</property>
@@ -1119,7 +1297,7 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="label13">
+ <object class="GtkLabel" id="label14">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="yalign">1</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]