[chronojump] Adds in the importer dialog two comboboxes to select if "import into a new session" or "into the exi
- From: Carles Pina i Estany <carlespina src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Adds in the importer dialog two comboboxes to select if "import into a new session" or "into the exi
- Date: Fri, 18 Nov 2016 17:50:44 +0000 (UTC)
commit 96aa4ef4b7e5e14bc9b71ea3c8251dde6d9e2846
Author: Carles Pina i Estany <carles pina cat>
Date: Fri Nov 18 18:46:17 2016 +0100
Adds in the importer dialog two comboboxes to select if "import into a new session" or "into the existing
session"
At the moment the comboboxes are not used in the code and are invisible.
glade/session_load.glade | 103 +++++++++++++++++++++++++++++++++++-----------
src/gui/session.cs | 7 +++-
2 files changed, 85 insertions(+), 25 deletions(-)
---
diff --git a/glade/session_load.glade b/glade/session_load.glade
index dd42a97..db54050 100644
--- a/glade/session_load.glade
+++ b/glade/session_load.glade
@@ -18,14 +18,51 @@
<property name="can_focus">False</property>
<property name="spacing">10</property>
<child>
- <widget class="GtkHBox" id="session_import_box">
+ <widget class="GtkVBox" id="session_import_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <widget class="GtkLabel" id="file_label">
+ <widget class="GtkHBox" id="filename_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">File name:</property>
+ <child>
+ <widget class="GtkLabel" id="file_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">File name:</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="file_path_import">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="select_file_import">
+ <property name="label">gtk-open</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="on_select_file_import_clicked" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -34,29 +71,44 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="file_path_import">
- <property name="visible">True</property>
+ <widget class="GtkHBox" id="import_options_box">
<property name="can_focus">False</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="select_file_import">
- <property name="label">gtk-open</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="on_select_file_import_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkRadioButton" id="radio_import_new_session">
+ <property name="label" translatable="yes">Import in a new session</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="radio_import_current_session">
+ <property name="label" translatable="yes">Import in the current session</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radio_import_new_session</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
@@ -67,6 +119,9 @@
</packing>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -162,7 +217,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -182,7 +237,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
@@ -228,7 +283,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
</widget>
diff --git a/src/gui/session.cs b/src/gui/session.cs
index cc5d644..b251e98 100644
--- a/src/gui/session.cs
+++ b/src/gui/session.cs
@@ -659,7 +659,7 @@ public class SessionLoadWindow {
[Widget] Gtk.CheckButton checkbutton_show_data_jump_run;
[Widget] Gtk.CheckButton checkbutton_show_data_encoder;
[Widget] Gtk.Label file_path_import;
- [Widget] Gtk.HBox session_import_box;
+ [Widget] Gtk.VBox session_import_box;
static SessionLoadWindow SessionLoadWindowBox;
@@ -698,9 +698,14 @@ public class SessionLoadWindow {
treeview_session_load.Selection.Changed += onSelectionEntry;
+ /**
+ * Uncomment if we want the session file chooser to be loaded with the dialog.
+ * On Linux at least the placement of the Windows can be strange so at the moment
+ * I leave it disabled until we discuss (to enable or to delete it).
if (type == WindowType.IMPORT_SESSION) {
chooseDatabaseToImport ();
}
+ */
}
private TreeStore getStore(bool showContacts, bool showEncoder) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]