[gevice] Fixes bug #583793.
- From: Alejandro Valdes Jimenez <avaldes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gevice] Fixes bug #583793.
- Date: Mon, 25 May 2009 21:55:35 -0400 (EDT)
commit 4221afd10b2c62e6156a8314a84dc52957643a0d
Author: Alejandro Valdes Jimenez <avaldes utalca cl>
Date: Mon May 25 21:55:22 2009 -0400
Fixes bug #583793.
---
ChangeLog | 8 +
data/glade/gevice.glade | 760 +++++++++++++++++++++++++++--------------------
src/gevice.py | 13 +-
src/gevicedatabase.py | 30 ++
4 files changed, 484 insertions(+), 327 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1698458..fceeb86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-25 Chihau Chau <chihau gmail com>
+ Fixes bug #583793.
+ * src/gevice.py: change on_action_save method for save model
+ * src/gevicedatabase.py: added new methods to load interface and save
+ model asking the database password
+ * data/glade/gevice.glade: added window_database_save window to ask
+ password and save model
+
2009-05-22 Alejandro Valdes jimenez <avaldes gnome org>
Fixes bug #583562.
* src/gevice.py: use show_message().
diff --git a/data/glade/gevice.glade b/data/glade/gevice.glade
index 2403e30..ef131b8 100644
--- a/data/glade/gevice.glade
+++ b/data/glade/gevice.glade
@@ -1,12 +1,12 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.4.5 on Mon May 25 07:14:21 2009 -->
<glade-interface>
- <!-- interface-requires gtk+ 2.16 -->
- <!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="window_main">
<property name="width_request">700</property>
<property name="height_request">500</property>
<property name="title" translatable="yes">Gevice</property>
- <property name="window_position">center</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
<child>
<widget class="GtkVBox" id="vbox_main">
<property name="visible">True</property>
@@ -40,9 +40,6 @@
</packing>
</child>
</widget>
- <packing>
- <property name="position">0</property>
- </packing>
</child>
</widget>
</child>
@@ -51,9 +48,9 @@
<property name="border_width">5</property>
<property name="title" translatable="yes">Device</property>
<property name="resizable">False</property>
- <property name="window_position">center</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
<property name="destroy_with_parent">True</property>
- <property name="type_hint">dialog</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<child>
<widget class="GtkVBox" id="vbox4">
<property name="visible">True</property>
@@ -70,78 +67,64 @@
<property name="column_spacing">2</property>
<property name="row_spacing">2</property>
<child>
- <widget class="GtkEntry" id="entry_comment_device">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label1">
+ <widget class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">Comment</property>
+ <property name="label" translatable="yes" context="yes">Name</property>
</widget>
<packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry_serial_device">
+ <widget class="GtkEntry" id="entry_name_device">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="activates_default">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label11">
+ <widget class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">Serial</property>
+ <property name="label" translatable="yes" context="yes">Link</property>
</widget>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="combo_model">
+ <widget class="GtkComboBox" id="combo_link">
<property name="visible">True</property>
<property name="items" translatable="yes" context="yes"></property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label5">
+ <widget class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">Model</property>
+ <property name="label" translatable="yes" context="yes">IP</property>
</widget>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
@@ -160,80 +143,92 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label4">
+ <widget class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">IP</property>
+ <property name="label" translatable="yes" context="yes">Model</property>
</widget>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkComboBox" id="combo_link">
+ <widget class="GtkComboBox" id="combo_model">
<property name="visible">True</property>
<property name="items" translatable="yes" context="yes"></property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label12">
+ <widget class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">Link</property>
+ <property name="label" translatable="yes" context="yes">Serial</property>
</widget>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry_name_device">
+ <widget class="GtkEntry" id="entry_serial_device">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="activates_default">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label2">
+ <widget class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">Name</property>
+ <property name="label" translatable="yes" context="yes">Comment</property>
</widget>
<packing>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkEntry" id="entry_comment_device">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
</packing>
</child>
<child>
@@ -242,32 +237,31 @@
<property name="spacing">5</property>
<child>
<widget class="GtkButton" id="button_cancel_device">
- <property name="label" context="yes">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" context="yes">gtk-cancel</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="pack_type">GTK_PACK_END</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_accept_device">
- <property name="label" context="yes">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" context="yes">gtk-ok</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
+ <property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
</widget>
@@ -284,9 +278,9 @@
<property name="border_width">5</property>
<property name="title" translatable="yes" context="yes">Preferences</property>
<property name="resizable">False</property>
- <property name="window_position">center</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
<property name="destroy_with_parent">True</property>
- <property name="type_hint">dialog</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<child>
<widget class="GtkVBox" id="vbox3">
<property name="visible">True</property>
@@ -302,61 +296,61 @@
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
- <widget class="GtkCheckButton" id="checkbutton_comments">
- <property name="label" translatable="yes" context="yes">Comment</property>
+ <widget class="GtkCheckButton" id="checkbutton_model">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" translatable="yes" context="yes">Model</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="checkbutton_serial">
- <property name="label" translatable="yes" context="yes">Serial</property>
+ <widget class="GtkCheckButton" id="checkbutton_ip">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" translatable="yes" context="yes">IP</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
</child>
<child>
- <widget class="GtkCheckButton" id="checkbutton_ip">
- <property name="label" translatable="yes" context="yes">IP</property>
+ <widget class="GtkCheckButton" id="checkbutton_serial">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" translatable="yes" context="yes">Serial</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
</child>
<child>
- <widget class="GtkCheckButton" id="checkbutton_model">
- <property name="label" translatable="yes" context="yes">Model</property>
+ <widget class="GtkCheckButton" id="checkbutton_comments">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" translatable="yes" context="yes">Comment</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
</packing>
</child>
</widget>
@@ -370,8 +364,8 @@
<property name="label" translatable="yes" context="yes">View</property>
</widget>
<packing>
- <property name="tab_fill">False</property>
<property name="type">tab</property>
+ <property name="tab_fill">False</property>
</packing>
</child>
<child>
@@ -381,8 +375,8 @@
<widget class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<child>
<widget class="GtkTreeView" id="treeview_users">
<property name="visible">True</property>
@@ -391,36 +385,33 @@
</widget>
</child>
</widget>
- <packing>
- <property name="position">0</property>
- </packing>
</child>
<child>
<widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
<child>
<widget class="GtkButton" id="button_add_user">
- <property name="label" translatable="yes">gtk-add</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="label" translatable="yes" context="yes">gtk-add</property>
<property name="use_stock">True</property>
<property name="xalign">0.50999999046325684</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_rem_user">
- <property name="label" translatable="yes">gtk-remove</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="label" translatable="yes" context="yes">gtk-remove</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -441,14 +432,14 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label1">
+ <widget class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="label" translatable="yes">Lists of users</property>
+ <property name="label" translatable="yes" context="yes">Lists of users</property>
</widget>
<packing>
+ <property name="type">tab</property>
<property name="position">1</property>
<property name="tab_fill">False</property>
- <property name="type">tab</property>
</packing>
</child>
<child>
@@ -468,85 +459,83 @@
<property name="n_columns">3</property>
<property name="column_spacing">5</property>
<child>
- <widget class="GtkButton" id="button_forecolor">
- <property name="label" context="yes">gtk-select-color</property>
+ <widget class="GtkLabel" id="label8">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
+ <property name="label" translatable="yes" context="yes">Background</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button_backcolor">
- <property name="label" context="yes">gtk-select-color</property>
+ <widget class="GtkLabel" id="label9">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
+ <property name="label" translatable="yes" context="yes">Text color</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry_forecolor">
+ <widget class="GtkEntry" id="entry_backcolor">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
- <property name="invisible_char">●</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry_backcolor">
+ <widget class="GtkEntry" id="entry_forecolor">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
- <property name="invisible_char">●</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label9">
+ <widget class="GtkButton" id="button_backcolor">
<property name="visible">True</property>
- <property name="label" translatable="yes" context="yes">Text color</property>
+ <property name="can_focus">True</property>
+ <property name="label" context="yes">gtk-select-color</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label8">
+ <widget class="GtkButton" id="button_forecolor">
<property name="visible">True</property>
- <property name="label" translatable="yes" context="yes">Background</property>
+ <property name="can_focus">True</property>
+ <property name="label" context="yes">gtk-select-color</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
@@ -563,9 +552,9 @@
<property name="label" translatable="yes" context="yes">Colors</property>
</widget>
<packing>
+ <property name="type">tab</property>
<property name="position">3</property>
<property name="tab_fill">False</property>
- <property name="type">tab</property>
</packing>
</child>
<child>
@@ -575,23 +564,30 @@
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
- <widget class="GtkCheckButton" id="checkbutton_ip_diag">
- <property name="label" translatable="yes" context="yes">IP</property>
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="checkbutton_link_diag">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" translatable="yes" context="yes">Link</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
</child>
<child>
<widget class="GtkCheckButton" id="checkbutton_model_diag">
- <property name="label" translatable="yes" context="yes">Model</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" translatable="yes" context="yes">Model</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</widget>
@@ -601,22 +597,15 @@
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="checkbutton_link_diag">
- <property name="label" translatable="yes" context="yes">Link</property>
+ <widget class="GtkCheckButton" id="checkbutton_ip_diag">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" translatable="yes" context="yes">IP</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <placeholder/>
</child>
</widget>
<packing>
@@ -629,9 +618,9 @@
<property name="label" translatable="yes" context="yes">Diagram</property>
</widget>
<packing>
+ <property name="type">tab</property>
<property name="position">4</property>
<property name="tab_fill">False</property>
- <property name="type">tab</property>
</packing>
</child>
<child>
@@ -641,39 +630,31 @@
<property name="n_rows">3</property>
<property name="n_columns">2</property>
<child>
- <widget class="GtkLabel" id="label24">
+ <widget class="GtkEntry" id="entry_host">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">User database</property>
+ <property name="can_focus">True</property>
</widget>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label23">
+ <widget class="GtkEntry" id="entry_dbase">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">Database</property>
+ <property name="can_focus">True</property>
</widget>
<packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">Host</property>
- </widget>
- </child>
- <child>
<widget class="GtkEntry" id="entry_user_dbase">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="invisible_char">●</property>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -683,27 +664,32 @@
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry_dbase">
+ <widget class="GtkLabel" id="label19">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes" context="yes">Host</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label23">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes" context="yes">Database</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry_host">
+ <widget class="GtkLabel" id="label24">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes" context="yes">User database</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
</packing>
</child>
</widget>
@@ -718,9 +704,9 @@
<property name="label" translatable="yes" context="yes">Database</property>
</widget>
<packing>
+ <property name="type">tab</property>
<property name="position">5</property>
<property name="tab_fill">False</property>
- <property name="type">tab</property>
</packing>
</child>
<child>
@@ -729,23 +715,22 @@
<property name="border_width">5</property>
<property name="n_columns">2</property>
<child>
- <widget class="GtkLabel" id="label29">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">Separator</property>
- </widget>
- </child>
- <child>
<widget class="GtkEntry" id="entry_csvseparator">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="invisible_char">●</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
+ <child>
+ <widget class="GtkLabel" id="label29">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes" context="yes">Separator</property>
+ </widget>
+ </child>
</widget>
<packing>
<property name="position">6</property>
@@ -753,21 +738,20 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label3">
+ <widget class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="label" translatable="yes" context="yes">CSV</property>
</widget>
<packing>
+ <property name="type">tab</property>
<property name="position">6</property>
<property name="tab_fill">False</property>
- <property name="type">tab</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
</packing>
</child>
<child>
@@ -775,17 +759,16 @@
<property name="visible">True</property>
<child>
<widget class="GtkButton" id="button_close_prefer">
- <property name="label" context="yes">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" context="yes">gtk-close</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
+ <property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
</widget>
@@ -803,7 +786,7 @@
<property name="border_width">5</property>
<property name="title" translatable="yes" context="yes">Generate diagram</property>
<property name="resizable">False</property>
- <property name="window_position">center</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
<child>
<widget class="GtkVBox" id="vbox8">
<property name="visible">True</property>
@@ -820,7 +803,6 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
</packing>
</child>
<child>
@@ -866,7 +848,6 @@ svg</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
</packing>
</child>
<child>
@@ -875,32 +856,31 @@ svg</property>
<property name="spacing">5</property>
<child>
<widget class="GtkButton" id="button_diagram_cancel">
- <property name="label" context="yes">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" context="yes">gtk-cancel</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="pack_type">GTK_PACK_END</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_diagram_generate">
- <property name="label" context="yes">gtk-convert</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" context="yes">gtk-convert</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
+ <property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
</widget>
@@ -917,9 +897,9 @@ svg</property>
<property name="border_width">5</property>
<property name="title" translatable="yes" context="yes">Find</property>
<property name="resizable">False</property>
- <property name="window_position">center</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
<child>
- <widget class="GtkVBox" id="vbox1">
+ <widget class="GtkVBox" id="vbox5">
<property name="visible">True</property>
<property name="spacing">15</property>
<child>
@@ -928,25 +908,22 @@ svg</property>
<property name="spacing">5</property>
<child>
<widget class="GtkRadioButton" id="radiobutton_namedevice">
- <property name="label" translatable="yes" context="yes">Device name</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" translatable="yes" context="yes">Device name</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</widget>
- <packing>
- <property name="position">0</property>
- </packing>
</child>
<child>
<widget class="GtkRadioButton" id="radiobutton_ip">
- <property name="label" translatable="yes" context="yes">IP</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" translatable="yes" context="yes">IP</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">radiobutton_namedevice</property>
@@ -957,11 +934,11 @@ svg</property>
</child>
<child>
<widget class="GtkRadioButton" id="radiobutton_serial">
- <property name="label" translatable="yes" context="yes">Serial</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" translatable="yes" context="yes">Serial</property>
<property name="use_underline">True</property>
+ <property name="response_id">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">radiobutton_namedevice</property>
@@ -974,11 +951,10 @@ svg</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox1">
+ <widget class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="spacing">5</property>
<child>
@@ -989,7 +965,6 @@ svg</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
</packing>
</child>
<child>
@@ -997,7 +972,6 @@ svg</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="invisible_char">●</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -1018,32 +992,31 @@ svg</property>
<property name="spacing">5</property>
<child>
<widget class="GtkButton" id="button_find_cancel">
- <property name="label" context="yes">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" context="yes">gtk-cancel</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="pack_type">GTK_PACK_END</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_find_find">
- <property name="label" context="yes">gtk-find</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" context="yes">gtk-find</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
+ <property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
</widget>
@@ -1059,9 +1032,9 @@ svg</property>
<widget class="GtkWindow" id="window_database">
<property name="title" translatable="yes" context="yes">Connect to database</property>
<property name="modal">True</property>
- <property name="window_position">center</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
<child>
- <widget class="GtkVBox" id="vbox5">
+ <widget class="GtkVBox" id="vbox6">
<property name="visible">True</property>
<property name="spacing">5</property>
<child>
@@ -1073,43 +1046,40 @@ svg</property>
<property name="column_spacing">10</property>
<property name="row_spacing">5</property>
<child>
- <widget class="GtkLabel" id="label25">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">Host:</property>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label26">
+ <widget class="GtkEntry" id="entry_passwd_dbase">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">Database:</property>
+ <property name="can_focus">True</property>
+ <property name="visibility">False</property>
</widget>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label27">
+ <widget class="GtkLabel" id="label_user_dbase">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">User database:</property>
</widget>
<packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label28">
+ <widget class="GtkLabel" id="label_dbase">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes" context="yes">Password:</property>
</widget>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
</packing>
</child>
<child>
@@ -1123,47 +1093,46 @@ svg</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label_dbase">
+ <widget class="GtkLabel" id="label28">
<property name="visible">True</property>
<property name="xalign">0</property>
+ <property name="label" translatable="yes" context="yes">Password:</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label_user_dbase">
+ <widget class="GtkLabel" id="label27">
<property name="visible">True</property>
<property name="xalign">0</property>
+ <property name="label" translatable="yes" context="yes">User database:</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry_passwd_dbase">
+ <widget class="GtkLabel" id="label26">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="visibility">False</property>
- <property name="invisible_char">●</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes" context="yes">Database:</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
</packing>
</child>
+ <child>
+ <widget class="GtkLabel" id="label25">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes" context="yes">Host:</property>
+ </widget>
+ </child>
</widget>
- <packing>
- <property name="position">0</property>
- </packing>
</child>
<child>
<widget class="GtkHBox" id="hbox11">
@@ -1172,32 +1141,31 @@ svg</property>
<property name="spacing">5</property>
<child>
<widget class="GtkButton" id="button_connect_cancel">
- <property name="label" context="yes">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" context="yes">gtk-cancel</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="pack_type">GTK_PACK_END</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_connect_dbase">
- <property name="label" context="yes">gtk-connect</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="label" context="yes">gtk-connect</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
+ <property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
</widget>
@@ -1210,19 +1178,18 @@ svg</property>
</child>
</widget>
<widget class="GtkWindow" id="window_maintainer">
- <property name="window_position">center</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
<property name="default_width">350</property>
<property name="default_height">300</property>
<child>
<widget class="GtkVBox" id="vbox7">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <widget class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<child>
<widget class="GtkTreeView" id="treeview">
<property name="visible">True</property>
@@ -1232,9 +1199,6 @@ svg</property>
</widget>
</child>
</widget>
- <packing>
- <property name="position">0</property>
- </packing>
</child>
<child>
<widget class="GtkHBox" id="hbox10">
@@ -1245,46 +1209,49 @@ svg</property>
</child>
<child>
<widget class="GtkButton" id="button_close">
- <property name="label" translatable="yes" context="yes">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="label" translatable="yes" context="yes">gtk-close</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="pack_type">GTK_PACK_END</property>
<property name="position">3</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_add">
- <property name="label" translatable="yes" context="yes">gtk-add</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="label" translatable="yes" context="yes">gtk-add</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="pack_type">GTK_PACK_END</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_rem">
- <property name="label" translatable="yes" context="yes">gtk-remove</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="label" translatable="yes" context="yes">gtk-remove</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="pack_type">GTK_PACK_END</property>
<property name="position">1</property>
</packing>
</child>
@@ -1299,19 +1266,18 @@ svg</property>
</child>
</widget>
<widget class="GtkWindow" id="window_maintainer1">
- <property name="window_position">center</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
<property name="default_width">350</property>
<property name="default_height">300</property>
<child>
<widget class="GtkVBox" id="vbox9">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <widget class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<child>
<widget class="GtkTreeView" id="treeview1">
<property name="visible">True</property>
@@ -1321,9 +1287,6 @@ svg</property>
</widget>
</child>
</widget>
- <packing>
- <property name="position">0</property>
- </packing>
</child>
<child>
<widget class="GtkHBox" id="hbox12">
@@ -1334,46 +1297,49 @@ svg</property>
</child>
<child>
<widget class="GtkButton" id="button_close1">
- <property name="label" translatable="yes" context="yes">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="label" translatable="yes" context="yes">gtk-close</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="pack_type">GTK_PACK_END</property>
<property name="position">3</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_add1">
- <property name="label" translatable="yes" context="yes">gtk-add</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="label" translatable="yes" context="yes">gtk-add</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="pack_type">GTK_PACK_END</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_rem1">
- <property name="label" translatable="yes" context="yes">gtk-remove</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="label" translatable="yes" context="yes">gtk-remove</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="pack_type">GTK_PACK_END</property>
<property name="position">1</property>
</packing>
</child>
@@ -1390,11 +1356,10 @@ svg</property>
<widget class="GtkWindow" id="window_model">
<property name="title" translatable="yes" context="yes">New Model</property>
<property name="modal">True</property>
- <property name="window_position">center</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
<child>
<widget class="GtkVBox" id="vbox10">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<widget class="GtkTable" id="table5">
@@ -1404,15 +1369,40 @@ svg</property>
<property name="column_spacing">5</property>
<property name="row_spacing">2</property>
<child>
- <widget class="GtkComboBox" id="combobox_mark">
+ <widget class="GtkLabel" id="label17">
<property name="visible">True</property>
+ <property name="label" translatable="yes" context="yes">Model</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes" context="yes">Type</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label21">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes" context="yes">Mark</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkEntry" id="entry_model">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
@@ -1430,87 +1420,209 @@ svg</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry_model">
+ <widget class="GtkComboBox" id="combobox_mark">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="x_options"></property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox13">
+ <property name="visible">True</property>
<child>
- <widget class="GtkLabel" id="label21">
+ <widget class="GtkButton" id="button_cancel">
<property name="visible">True</property>
- <property name="label" translatable="yes" context="yes">Mark</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="label" translatable="yes" context="yes">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">0</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_ok">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="label" translatable="yes" context="yes">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="GtkWindow" id="window_database_save">
+ <property name="title" translatable="yes" context="yes">Save model to database</property>
+ <property name="modal">True</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
+ <child>
+ <widget class="GtkVBox" id="vbox11">
+ <property name="visible">True</property>
+ <property name="spacing">5</property>
+ <child>
+ <widget class="GtkTable" id="table8">
+ <property name="visible">True</property>
+ <property name="border_width">5</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">10</property>
+ <property name="row_spacing">5</property>
+ <child>
+ <widget class="GtkEntry" id="entry_passwd_dbase1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="visibility">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_user_dbase1">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label17">
+ <widget class="GtkLabel" id="label_dbase1">
<property name="visible">True</property>
- <property name="label" translatable="yes" context="yes">Type</property>
+ <property name="xalign">0</property>
</widget>
<packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label6">
+ <widget class="GtkLabel" id="label_host1">
<property name="visible">True</property>
- <property name="label" translatable="yes" context="yes">Model</property>
+ <property name="xalign">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label22">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes" context="yes">Password:</property>
+ </widget>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label30">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes" context="yes">User database:</property>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label31">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes" context="yes">Database:</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label32">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes" context="yes">Host:</property>
</widget>
</child>
</widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox13">
+ <widget class="GtkHBox" id="hbox6">
<property name="visible">True</property>
+ <property name="border_width">5</property>
+ <property name="spacing">5</property>
<child>
- <widget class="GtkButton" id="button_cancel">
- <property name="label" translatable="yes" context="yes">gtk-cancel</property>
+ <widget class="GtkButton" id="button_connect_cancel1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="label" context="yes">gtk-cancel</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="pack_type">GTK_PACK_END</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button_ok">
- <property name="label" translatable="yes" context="yes">gtk-ok</property>
+ <widget class="GtkButton" id="button_connect_dbase1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="label" context="yes">gtk-save</property>
<property name="use_stock">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
+ <property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
</widget>
<packing>
- <property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
diff --git a/src/gevice.py b/src/gevice.py
index 5356ddf..0420b5d 100755
--- a/src/gevice.py
+++ b/src/gevice.py
@@ -520,10 +520,17 @@ class Gevice:
def on_action_save (gevice,action):
# temporal
gevice.gdbase = gevicedatabase.GeviceDatabase ()
- gevice.gdbase.conn = psycopg2.connect("dbname=" + gevice.gpref.dbase + " user=" + gevice.gpref.user_dbase + " host=" + gevice.gpref.host + " password=rss123")
- gevice.gdbase.cur = gevice.gdbase.conn.cursor()
+ #gevice.gdbase.conn = psycopg2.connect("dbname=" + gevice.gpref.dbase + " user=" + gevice.gpref.user_dbase + " host=" + gevice.gpref.host + " password=rss123")
+ #gevice.gdbase.cur = gevice.gdbase.conn.cursor()
#
- gevice.gdbase.save_data_to_database (gevice)
+ #gevice.gdbase.save_data_to_database (gevice)
+
+ gevice.gdbase.load_interface_save (gevice)
+ gevice.gdbase.label_host.set_text (gevice.gpref.host)
+ gevice.gdbase.label_dbase.set_text (gevice.gpref.dbase)
+ gevice.gdbase.label_user_dbase.set_text (gevice.gpref.user_dbase)
+
+ gevice.gdbase.show_interface()
def on_action_connect(self,action):
flag = True
diff --git a/src/gevicedatabase.py b/src/gevicedatabase.py
index d1fed23..bc94cc7 100644
--- a/src/gevicedatabase.py
+++ b/src/gevicedatabase.py
@@ -80,6 +80,20 @@ class GeviceDatabase:
self.button_connect_dbase.connect ("clicked",self.on_button_connect_dbase_clicked,gevice)
self.button_connect_cancel.connect ("clicked",self.on_button_connect_cancel_clicked)
+ def load_interface_save (self,gevice):
+ glade_file = gtk.glade.XML (os.path.join (config.GLADEDIR, "gevice.glade"),"window_database_save",None)
+ self.window_database = glade_file.get_widget ("window_database_save")
+ self.button_connect_cancel = glade_file.get_widget ("button_connect_cancel1")
+ self.button_connect_dbase = glade_file.get_widget ("button_connect_dbase1")
+ self.label_host = glade_file.get_widget ("label_host1")
+ self.label_dbase = glade_file.get_widget ("label_dbase1")
+ self.label_user_dbase = glade_file.get_widget ("label_user_dbase1")
+ self.entry_passwd_dbase = glade_file.get_widget ("entry_passwd_dbase1")
+
+ self.entry_passwd_dbase.connect ("key-press-event", self.on_entry_passwd_dbase_key_press_save,gevice)
+ self.button_connect_dbase.connect ("clicked",self.on_button_connect_dbase_clicked_save,gevice)
+ self.button_connect_cancel.connect ("clicked",self.on_button_connect_cancel_clicked)
+
def close_window (self,window):
window.destroy()
@@ -89,6 +103,9 @@ class GeviceDatabase:
if gtk.gdk.keyval_name(event.keyval) == "Return":
self.on_button_connect_dbase_clicked(None,gevice)
+ def on_entry_passwd_dbase_key_press_save (self,widget,event,gevice):
+ if gtk.gdk.keyval_name(event.keyval) == "Return":
+ self.on_button_connect_dbase_clicked_save(None,gevice)
def on_button_connect_cancel_clicked (self,button):
self.close_window (self.window_database)
@@ -113,6 +130,19 @@ class GeviceDatabase:
else:
gevice.connected_to_database = False
+ def on_button_connect_dbase_clicked_save (self,button,gevice):
+ passwd = self.entry_passwd_dbase.get_text()
+ self.conn = self.connect(passwd,gevice)
+
+ if (self.conn):
+ gevice.connected_to_database = True
+ self.cur = self.conn.cursor()
+
+ self.save_data_to_database(gevice)
+
+ self.close_window (self.window_database)
+ else:
+ gevice.connected_to_database = False
def show_interface (self):
self.window_database.show_all()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]