[gevice] add new fields to database
- From: Alejandro Valdes Jimenez <avaldes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gevice] add new fields to database
- Date: Wed, 7 Jul 2010 22:20:32 +0000 (UTC)
commit 59523cfab0dfd2f36c139f8634cd3d80677fc75a
Author: Alejandro Valdes Jimenez <avaldes amvj-laptop utalca cl>
Date: Wed Jul 7 18:18:41 2010 -0400
add new fields to database
ChangeLog | 6 +
data/glade/gevice.glade | 347 +++++++++++++++++++++++++++++++----------------
modelo_gevice.png | Bin 0 -> 16354 bytes
src/config.py.in | 12 ++-
src/gevice.py | 1 +
src/gevicedatabase.py | 36 ++++-
src/gevicedevice.py | 35 +++++-
src/gevicemodel.py | 24 +++-
src/geviceprefer.py | 16 ++-
9 files changed, 346 insertions(+), 131 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 290adbf..64229e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-07-07 Alejandro Valdes Jimenez <avaldes gnome org>
+
+ * modelo_gevice.png: Add image of model of database
+ * src/gevicedevice.py: add new widget for location and ports availables.
+ * data/glade/gevice.glade: add new widget for location and ports availables.
+
2010-01-04 Alejandro Valdes Jimenez <avaldes gnome org>
* src/gevicedevice.py:
diff --git a/data/glade/gevice.glade b/data/glade/gevice.glade
index 3c1eb36..b79d721 100644
--- a/data/glade/gevice.glade
+++ b/data/glade/gevice.glade
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Tue Jul 28 12:32:11 2009 -->
+<?xml version="1.0"?>
<glade-interface>
+ <!-- interface-requires gtk+ 2.6 -->
+ <!-- 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">GTK_WIN_POS_CENTER</property>
+ <property name="window_position">center</property>
<child>
<widget class="GtkVBox" id="vbox_main">
<property name="visible">True</property>
@@ -31,13 +31,15 @@
<child>
<widget class="GtkVBox" id="vboxterminal">
<property name="visible">True</property>
- <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
- <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
+ <property name="orientation">vertical</property>
<child>
<widget class="GtkNotebook" id="notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
</widget>
+ <packing>
+ <property name="position">0</property>
+ </packing>
</child>
</widget>
<packing>
@@ -46,6 +48,9 @@
</packing>
</child>
</widget>
+ <packing>
+ <property name="position">0</property>
+ </packing>
</child>
</widget>
</child>
@@ -54,9 +59,9 @@
<property name="border_width">5</property>
<property name="title" translatable="yes">Device</property>
<property name="resizable">False</property>
- <property name="window_position">GTK_WIN_POS_CENTER</property>
+ <property name="window_position">center</property>
<property name="destroy_with_parent">True</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="type_hint">dialog</property>
<child>
<widget class="GtkVBox" id="vbox4">
<property name="visible">True</property>
@@ -68,7 +73,7 @@
<child>
<widget class="GtkTable" id="table_data">
<property name="visible">True</property>
- <property name="n_rows">6</property>
+ <property name="n_rows">8</property>
<property name="n_columns">2</property>
<property name="column_spacing">2</property>
<property name="row_spacing">2</property>
@@ -225,16 +230,66 @@
<property name="y_options"></property>
</packing>
</child>
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Location</property>
+ </widget>
+ <packing>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="combo_location">
+ <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">6</property>
+ <property name="bottom_attach">7</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Ports Availables</property>
+ </widget>
+ <packing>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkEntry" id="entry_ports">
+ <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="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ <property name="y_options"></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>
@@ -243,31 +298,32 @@
<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="label" context="yes">gtk-cancel</property>
+ <property name="receives_default">False</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="pack_type">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="label" context="yes">gtk-ok</property>
+ <property name="receives_default">False</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="pack_type">end</property>
+ <property name="position">0</property>
</packing>
</child>
</widget>
@@ -284,9 +340,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">GTK_WIN_POS_CENTER</property>
+ <property name="window_position">center</property>
<property name="destroy_with_parent">True</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="type_hint">dialog</property>
<child>
<widget class="GtkVBox" id="vbox3">
<property name="visible">True</property>
@@ -300,14 +356,14 @@
<property name="visible">True</property>
<property name="border_width">5</property>
<property name="n_rows">2</property>
- <property name="n_columns">2</property>
+ <property name="n_columns">3</property>
<child>
<widget class="GtkCheckButton" id="checkbutton_comments">
+ <property name="label" translatable="yes" context="yes">Comment</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" context="yes">Comment</property>
+ <property name="receives_default">False</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>
@@ -320,11 +376,11 @@
</child>
<child>
<widget class="GtkCheckButton" id="checkbutton_serial">
+ <property name="label" translatable="yes" context="yes">Serial</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" context="yes">Serial</property>
+ <property name="receives_default">False</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>
@@ -335,22 +391,22 @@
</child>
<child>
<widget class="GtkCheckButton" id="checkbutton_ip">
+ <property name="label" translatable="yes" context="yes">IP</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" context="yes">IP</property>
+ <property name="receives_default">False</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>
</child>
<child>
<widget class="GtkCheckButton" id="checkbutton_model">
+ <property name="label" translatable="yes" context="yes">Model</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" context="yes">Model</property>
+ <property name="receives_default">False</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>
@@ -359,6 +415,38 @@
<property name="right_attach">2</property>
</packing>
</child>
+ <child>
+ <widget class="GtkCheckButton" id="checkbutton_location">
+ <property name="label" translatable="yes" context="yes">Location</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="checkbutton_ports">
+ <property name="label" translatable="yes" context="yes">Ports Availables</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</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>
+ </packing>
+ </child>
</widget>
<packing>
<property name="tab_fill">False</property>
@@ -370,8 +458,8 @@
<property name="label" translatable="yes" context="yes">View</property>
</widget>
<packing>
- <property name="type">tab</property>
<property name="tab_fill">False</property>
+ <property name="type">tab</property>
</packing>
</child>
<child>
@@ -381,8 +469,8 @@
<widget class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
<child>
<widget class="GtkTreeView" id="treeview_users">
<property name="visible">True</property>
@@ -391,33 +479,35 @@
</widget>
</child>
</widget>
+ <packing>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
<widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<child>
<widget class="GtkButton" id="button_add_user">
+ <property name="label" 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="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" 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>
@@ -443,9 +533,9 @@
<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>
@@ -466,11 +556,11 @@
<property name="column_spacing">5</property>
<child>
<widget class="GtkButton" id="button_forecolor">
+ <property name="label" context="yes">gtk-select-color</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" context="yes">gtk-select-color</property>
+ <property name="receives_default">False</property>
<property name="use_stock">True</property>
- <property name="response_id">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
@@ -483,11 +573,11 @@
</child>
<child>
<widget class="GtkButton" id="button_backcolor">
+ <property name="label" context="yes">gtk-select-color</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" context="yes">gtk-select-color</property>
+ <property name="receives_default">False</property>
<property name="use_stock">True</property>
- <property name="response_id">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
@@ -558,9 +648,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>
@@ -570,26 +660,23 @@
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
- <placeholder/>
- </child>
- <child>
<widget class="GtkCheckButton" id="checkbutton_ip_diag">
+ <property name="label" translatable="yes" context="yes">IP</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" context="yes">IP</property>
+ <property name="receives_default">False</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>
</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="label" translatable="yes" context="yes">Model</property>
+ <property name="receives_default">False</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>
@@ -600,11 +687,11 @@
</child>
<child>
<widget class="GtkCheckButton" id="checkbutton_link_diag">
+ <property name="label" translatable="yes" context="yes">Link</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes" context="yes">Link</property>
+ <property name="receives_default">False</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>
@@ -613,6 +700,9 @@
<property name="bottom_attach">2</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">4</property>
@@ -624,9 +714,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>
@@ -710,9 +800,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>
@@ -749,15 +839,16 @@
<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>
@@ -765,16 +856,17 @@
<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="label" context="yes">gtk-close</property>
+ <property name="receives_default">False</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="pack_type">end</property>
+ <property name="position">0</property>
</packing>
</child>
</widget>
@@ -792,7 +884,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">GTK_WIN_POS_CENTER</property>
+ <property name="window_position">center</property>
<child>
<widget class="GtkVBox" id="vbox8">
<property name="visible">True</property>
@@ -809,6 +901,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -854,6 +947,7 @@ svg</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -862,31 +956,32 @@ 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="label" context="yes">gtk-cancel</property>
+ <property name="receives_default">False</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="pack_type">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="label" context="yes">gtk-convert</property>
+ <property name="receives_default">False</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="pack_type">end</property>
+ <property name="position">0</property>
</packing>
</child>
</widget>
@@ -903,7 +998,7 @@ 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">GTK_WIN_POS_CENTER</property>
+ <property name="window_position">center</property>
<child>
<widget class="GtkVBox" id="vbox5">
<property name="visible">True</property>
@@ -914,22 +1009,25 @@ 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="label" translatable="yes" context="yes">Device name</property>
+ <property name="receives_default">False</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="label" translatable="yes" context="yes">IP</property>
+ <property name="receives_default">False</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>
@@ -940,11 +1038,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="label" translatable="yes" context="yes">Serial</property>
+ <property name="receives_default">False</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,6 +1055,7 @@ svg</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -971,6 +1070,7 @@ svg</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -998,31 +1098,32 @@ 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="label" context="yes">gtk-cancel</property>
+ <property name="receives_default">False</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="pack_type">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="label" context="yes">gtk-find</property>
+ <property name="receives_default">False</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="pack_type">end</property>
+ <property name="position">0</property>
</packing>
</child>
</widget>
@@ -1038,7 +1139,7 @@ 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">GTK_WIN_POS_CENTER</property>
+ <property name="window_position">center</property>
<child>
<widget class="GtkVBox" id="vbox6">
<property name="visible">True</property>
@@ -1139,6 +1240,9 @@ svg</property>
</packing>
</child>
</widget>
+ <packing>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
<widget class="GtkHBox" id="hbox11">
@@ -1147,31 +1251,32 @@ 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="label" context="yes">gtk-cancel</property>
+ <property name="receives_default">False</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="pack_type">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="label" context="yes">gtk-connect</property>
+ <property name="receives_default">False</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="pack_type">end</property>
+ <property name="position">0</property>
</packing>
</child>
</widget>
@@ -1184,7 +1289,7 @@ svg</property>
</child>
</widget>
<widget class="GtkWindow" id="window_maintainer">
- <property name="window_position">GTK_WIN_POS_CENTER</property>
+ <property name="window_position">center</property>
<property name="default_width">350</property>
<property name="default_height">300</property>
<child>
@@ -1194,8 +1299,8 @@ svg</property>
<widget class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
<child>
<widget class="GtkTreeView" id="treeview">
<property name="visible">True</property>
@@ -1205,6 +1310,9 @@ svg</property>
</widget>
</child>
</widget>
+ <packing>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
<widget class="GtkHBox" id="hbox10">
@@ -1215,49 +1323,46 @@ svg</property>
</child>
<child>
<widget class="GtkButton" id="button_close">
+ <property name="label" 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">GTK_PACK_END</property>
+ <property name="pack_type">end</property>
<property name="position">3</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_add">
+ <property name="label" 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">GTK_PACK_END</property>
+ <property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_rem">
+ <property name="label" 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">GTK_PACK_END</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
@@ -1272,7 +1377,7 @@ svg</property>
</child>
</widget>
<widget class="GtkWindow" id="window_maintainer1">
- <property name="window_position">GTK_WIN_POS_CENTER</property>
+ <property name="window_position">center</property>
<property name="default_width">350</property>
<property name="default_height">300</property>
<child>
@@ -1282,8 +1387,8 @@ svg</property>
<widget class="GtkScrolledWindow" id="scrolledwindow4">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
<child>
<widget class="GtkTreeView" id="treeview1">
<property name="visible">True</property>
@@ -1293,6 +1398,9 @@ svg</property>
</widget>
</child>
</widget>
+ <packing>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
<widget class="GtkHBox" id="hbox12">
@@ -1303,49 +1411,46 @@ svg</property>
</child>
<child>
<widget class="GtkButton" id="button_close1">
+ <property name="label" 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">GTK_PACK_END</property>
+ <property name="pack_type">end</property>
<property name="position">3</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_add1">
+ <property name="label" 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">GTK_PACK_END</property>
+ <property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_rem1">
+ <property name="label" 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">GTK_PACK_END</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
@@ -1362,7 +1467,7 @@ 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">GTK_WIN_POS_CENTER</property>
+ <property name="window_position">center</property>
<child>
<widget class="GtkVBox" id="vbox10">
<property name="visible">True</property>
@@ -1442,6 +1547,7 @@ svg</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -1449,33 +1555,32 @@ svg</property>
<property name="visible">True</property>
<child>
<widget class="GtkButton" id="button_cancel">
+ <property name="label" context="yes">gtk-cancel</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-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="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_ok">
+ <property name="label" context="yes">gtk-ok</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-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>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
</packing>
</child>
</widget>
@@ -1491,7 +1596,7 @@ svg</property>
<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>
+ <property name="window_position">center</property>
<child>
<widget class="GtkVBox" id="vbox11">
<property name="visible">True</property>
@@ -1592,6 +1697,9 @@ svg</property>
</packing>
</child>
</widget>
+ <packing>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
<widget class="GtkHBox" id="hbox6">
@@ -1600,31 +1708,32 @@ svg</property>
<property name="spacing">5</property>
<child>
<widget class="GtkButton" id="button_connect_cancel1">
+ <property name="label" context="yes">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" context="yes">gtk-cancel</property>
+ <property name="receives_default">False</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="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button_connect_dbase1">
+ <property name="label" context="yes">gtk-save</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" context="yes">gtk-save</property>
+ <property name="receives_default">False</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="pack_type">end</property>
+ <property name="position">0</property>
</packing>
</child>
</widget>
diff --git a/modelo_gevice.png b/modelo_gevice.png
new file mode 100644
index 0000000..f37e24e
Binary files /dev/null and b/modelo_gevice.png differ
diff --git a/src/config.py.in b/src/config.py.in
index cac251c..4a5d963 100644
--- a/src/config.py.in
+++ b/src/config.py.in
@@ -51,9 +51,11 @@ COLUMN_NAME_MODEL_DEV = 1
COLUMN_IP_DEV = 2
COLUMN_SERIAL_DEV = 3
COLUMN_OBS_DEV = 4
-COLUMN_ID_MODEL_DEV = 5
-COLUMN_ID_TYPE_LINK_DEV = 6
-
+COLUMN_LOCATION = 5
+COLUMN_PTAS_DISP = 6
+COLUMN_ID_MODEL_DEV = 7
+COLUMN_ID_TYPE_LINK_DEV = 8
+COLUMN_ID_LOCATION_DEV = 9
# struct liststore of models
COLUMN_NAME_MODEL_DEV2 = 0
@@ -63,6 +65,10 @@ COLUMN_ID_MODEL_DEV2 = 1
COLUMN_NAME_TYPE_LINK_DEV2 = 0
COLUMN_ID_TYPE_LINK_DEV2 = 1
+# struct liststore of location
+COLUMN_LOCATION_DEV2 = 0
+COLUMN_ID_LOCATION_DEV2 = 1
+
DEFAULT_TMP = "/tmp/"
diff --git a/src/gevice.py b/src/gevice.py
index c74a1af..b5c598b 100755
--- a/src/gevice.py
+++ b/src/gevice.py
@@ -121,6 +121,7 @@ class Gevice:
def __init__ (self):
self.list_models = None
self.list_links = None
+ self.list_location = None
self.connected_to_database = False
self.context_id = None
self.modelusers = gtk.ListStore(gobject.TYPE_STRING)
diff --git a/src/gevicedatabase.py b/src/gevicedatabase.py
index 0df56ad..a6f9a0a 100644
--- a/src/gevicedatabase.py
+++ b/src/gevicedatabase.py
@@ -131,8 +131,8 @@ class GeviceDatabase:
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)
+ passwd = self.entry_passwd_dbase.get_text()
+ self.conn = self.connect(passwd,gevice)
if (self.conn):
gevice.connected_to_database = True
@@ -182,7 +182,7 @@ class GeviceDatabase:
def process_row (self,serial,iterp,id_type_link,gevice):
sql = "select nom_disp,id_modelo,nom_tipo_disp || ' ' || nom_marca || ' ' || nom_modelo, "
- sql = sql + "ip_disp,serial,obs_disp "
+ sql = sql + "ip_disp,serial,obs_disp,ubicacion,id_rack,ptas_disp "
sql = sql + " from todoslosdispositivos where serial='" + serial + "'"
row = self.execute_sql_select(gevice,sql)
@@ -221,7 +221,9 @@ class GeviceDatabase:
config.COLUMN_IP_DEV,
config.COLUMN_SERIAL_DEV,
config.COLUMN_OBS_DEV,
- config.COLUMN_ID_TYPE_LINK_DEV)
+ config.COLUMN_ID_TYPE_LINK_DEV,
+ config.COLUMN_ID_LOCATION_DEV,
+ config.COLUMN_PTAS_DISP)
self.insert_device (data,gevice)
@@ -238,8 +240,8 @@ class GeviceDatabase:
def insert_device (self,data,gevice):
- sql = "insert into dispositivo (serial,id_modelo,nom_disp,obs_disp,ip_disp) "
- sql = sql + "values ('" + data[3] + "'," + data[1] + ",'" + data[0] + "','" + data[4] + "','" + data[2] + "');"
+ sql = "insert into dispositivo (serial,id_modelo,nom_disp,obs_disp,ip_disp,id_rack,ptas_disp) "
+ sql = sql + "values ('" + data[3] + "'," + data[1] + ",'" + data[0] + "','" + data[4] + "','" + data[2] + "','" + data[6] + "','" + data[7] + "');"
rp = self.execute_sql_insert (gevice,sql)
@@ -318,6 +320,28 @@ class GeviceDatabase:
else:
return False
+ def get_list_of_location (self,gevice):
+ liststore = gtk.ListStore(gobject.TYPE_STRING,gobject.TYPE_INT)
+
+ #sql = "select '[' || rack.detalle || '][' || nivel.nom_nivel || '][' || edificio.nom_edif || '][' || campus.nom_campus || ']' as location, rack.id_rack "
+ sql = "select '[' || campus.nom_campus || '][' || edificio.nom_edif || '][' || nivel.nom_nivel || '][' || rack.detalle || ']' as location, rack.id_rack "
+ sql = sql + "from rack "
+ sql = sql + "join edificio on rack.id_edif = edificio.id_edif "
+ sql = sql + "join nivel on rack.id_nivel = nivel.id_nivel "
+ sql = sql + "join campus on edificio.id_campus = campus.id_campus "
+ sql = sql + "order by campus.nom_campus,edificio.nom_edif,nivel.nom_nivel "
+
+ rows = self.execute_sql_select(gevice,sql)
+
+ if rows:
+ for row in rows:
+ iter = liststore.append ()
+ liststore.set (iter,config.COLUMN_LOCATION_DEV2,row[0],config.COLUMN_ID_LOCATION_DEV2,row[1])
+
+ return liststore
+ else:
+ return False
+
def get_list_of_mark (self,gevice):
liststore = gtk.ListStore(gobject.TYPE_STRING,gobject.TYPE_INT)
diff --git a/src/gevicedevice.py b/src/gevicedevice.py
index 28ea74a..2a54363 100644
--- a/src/gevicedevice.py
+++ b/src/gevicedevice.py
@@ -20,8 +20,10 @@ class GeviceDevice:
self.entry_ip_device = None
self.entry_comment_device = None
self.entry_serial_device = None
+ self.entry_ports = None
self.combo_link = None
self.combo_model = None
+ self.combo_location = None
self.button_cancel_device = None
self.button_accept_device = None
@@ -33,9 +35,11 @@ class GeviceDevice:
self.entry_name_device.set_text("")
self.entry_ip_device.set_text("127.0.0.1")
self.entry_serial_device.set_text("")
+ self.entry_ports.set_text("")
self.entry_comment_device.set_text("")
self.combo_model.set_active(0)
self.combo_link.set_active(0)
+ self.combo_location.set_active(0)
self.window_device.set_title (_("New device"))
def modify_device (self,gevice):
@@ -45,11 +49,13 @@ class GeviceDevice:
self.index_combo = 0
self.index_link = 0
+ self.index_location = 0
data = gevice.gmodel.get_data_of_device_from_model(gevice.gmodel.treeview)
self.id_model = data[1]
self.id_link = data[5]
+ self.id_location = data[6]
models = gevice.gdbase.get_list_of_models (gevice)
@@ -57,13 +63,18 @@ class GeviceDevice:
links = gevice.gdbase.get_list_of_links (gevice)
links.foreach (self.get_index_combo_link,gevice)
+
+ location = gevice.gdbase.get_list_of_location (gevice)
+ location.foreach (self.get_index_combo_location,gevice)
self.entry_name_device.set_text(data[0])
self.combo_model.set_active(self.index_combo)
self.entry_ip_device.set_text(data[2])
self.entry_serial_device.set_text(data[3])
self.entry_comment_device.set_text(data[4])
+ self.entry_ports.set_text(data[7])
self.combo_link.set_active(self.index_link)
+ self.combo_location.set_active(self.index_location)
self.window_device.set_title (_("Modify device"))
@@ -86,6 +97,15 @@ class GeviceDevice:
self.index_link = self.index_link + 1
+ def get_index_combo_location (self,model,path,iter,gevice):
+ data = model.get (iter,
+ config.COLUMN_ID_LOCATION_DEV2)
+
+ if (int(data[0]) == int(self.id_location)):
+ return True
+
+ self.index_location = self.index_location + 1
+
def remove_device (self,gevice):
self.action = "del"
@@ -118,7 +138,9 @@ class GeviceDevice:
self.entry_ip_device = glade_file.get_widget ("entry_ip_device")
self.entry_comment_device = glade_file.get_widget ("entry_comment_device")
self.entry_serial_device = glade_file.get_widget ("entry_serial_device")
+ self.entry_ports = glade_file.get_widget ("entry_ports")
self.combo_link = glade_file.get_widget ("combo_link")
+ self.combo_location = glade_file.get_widget ("combo_location")
self.combo_model = glade_file.get_widget ("combo_model")
self.button_cancel_device = glade_file.get_widget ("button_cancel_device")
self.button_accept_device = glade_file.get_widget ("button_accept_device")
@@ -133,6 +155,9 @@ class GeviceDevice:
gevice.list_links = gevice.gdbase.get_list_of_links (gevice)
self.combo_link.set_model (gevice.list_links)
+
+ gevice.list_location = gevice.gdbase.get_list_of_location (gevice)
+ self.combo_location.set_model (gevice.list_location)
def show_interface (self):
self.window_device.show_all ()
@@ -170,6 +195,7 @@ class GeviceDevice:
name = self.entry_name_device.get_text()
ip = self.entry_ip_device.get_text()
comment = self.entry_comment_device.get_text()
+ ports = self.entry_ports.get_text()
if (not name.strip()):
alldata = False
@@ -192,6 +218,10 @@ class GeviceDevice:
iter_type_link = self.combo_link.get_active_iter()
id_link = gevice.list_links.get_value(iter_type_link,config.COLUMN_ID_TYPE_LINK_DEV2)
+
+ iter_type_location = self.combo_location.get_active_iter()
+ id_location = gevice.list_location.get_value(iter_type_location,config.COLUMN_ID_LOCATION_DEV2)
+ name_location = gevice.list_location.get_value(iter_type_location,config.COLUMN_LOCATION_DEV2)
i = gevice.gmodel.get_iter_selected(gevice.gmodel.treeview)
@@ -207,7 +237,10 @@ class GeviceDevice:
config.COLUMN_IP_DEV,ip,
config.COLUMN_SERIAL_DEV,serial,
config.COLUMN_OBS_DEV,comment,
- config.COLUMN_ID_TYPE_LINK_DEV,id_link)
+ config.COLUMN_LOCATION,name_location,
+ config.COLUMN_ID_LOCATION_DEV,id_location,
+ config.COLUMN_ID_TYPE_LINK_DEV,id_link,
+ config.COLUMN_PTAS_DISP,ports)
if i["path"]:
gevice.gmodel.treeview.expand_to_path(i["path"][0])
diff --git a/src/gevicemodel.py b/src/gevicemodel.py
index 7035eb2..36a2b6b 100644
--- a/src/gevicemodel.py
+++ b/src/gevicemodel.py
@@ -19,6 +19,9 @@ class GeviceModel:
gobject.TYPE_STRING,
gobject.TYPE_STRING,
gobject.TYPE_STRING,
+ gobject.TYPE_STRING,
+ gobject.TYPE_STRING,
+ gobject.TYPE_STRING,
gobject.TYPE_STRING)
self.treeview = gtk.TreeView (self.treestore)
@@ -62,6 +65,19 @@ class GeviceModel:
col.pack_start (cell,True)
col.add_attribute (cell,"text",config.COLUMN_OBS_DEV)
+ col = gtk.TreeViewColumn (_("Location"))
+ col.set_resizable (True)
+ self.treeview.append_column (col)
+ cell = gtk.CellRendererText()
+ col.pack_start (cell,True)
+ col.add_attribute (cell,"text",config.COLUMN_LOCATION)
+
+ col = gtk.TreeViewColumn (_("Ports Availables"))
+ col.set_resizable (True)
+ self.treeview.append_column (col)
+ cell = gtk.CellRendererText()
+ col.pack_start (cell,True)
+ col.add_attribute (cell,"text",config.COLUMN_PTAS_DISP)
selection = self.treeview.get_selection()
selection.connect ("changed",self.on_device_selection_changed,gevice)
@@ -76,6 +92,9 @@ class GeviceModel:
config.COLUMN_IP_DEV,row[0][3],
config.COLUMN_SERIAL_DEV,row[0][4],
config.COLUMN_OBS_DEV,row[0][5],
+ config.COLUMN_LOCATION,row[0][6],
+ config.COLUMN_ID_LOCATION_DEV,row[0][7],
+ config.COLUMN_PTAS_DISP,row[0][8],
config.COLUMN_ID_TYPE_LINK_DEV,id_type_link)
@@ -106,7 +125,9 @@ class GeviceModel:
config.COLUMN_IP_DEV,
config.COLUMN_SERIAL_DEV,
config.COLUMN_OBS_DEV,
- config.COLUMN_ID_TYPE_LINK_DEV)
+ config.COLUMN_ID_TYPE_LINK_DEV,
+ config.COLUMN_ID_LOCATION_DEV,
+ config.COLUMN_PTAS_DISP)
return data
@@ -180,3 +201,4 @@ class GeviceModel:
self.treeview.expand_row(path,True)
else:
self.treeview.collapse_row(path)
+
diff --git a/src/geviceprefer.py b/src/geviceprefer.py
index 3a7895e..cfc9924 100644
--- a/src/geviceprefer.py
+++ b/src/geviceprefer.py
@@ -19,6 +19,8 @@ class GevicePrefer:
self.viewmodel = False
self.viewserial = False
self.viewcomments = False
+ self.viewlocation = False
+ self.viewports = False
self.backcolor = "#EBE9AE"
self.forecolor = "#000000"
self.diagip = False
@@ -40,6 +42,8 @@ class GevicePrefer:
self.checkbutton_model = glade_file.get_widget ("checkbutton_model")
self.checkbutton_serial = glade_file.get_widget ("checkbutton_serial")
self.checkbutton_comments = glade_file.get_widget ("checkbutton_comments")
+ self.checkbutton_location = glade_file.get_widget ("checkbutton_location")
+ self.checkbutton_ports = glade_file.get_widget ("checkbutton_ports")
self.entry_backcolor = glade_file.get_widget ("entry_backcolor")
self.entry_forecolor = glade_file.get_widget ("entry_forecolor")
self.entry_csvseparator = glade_file.get_widget ("entry_csvseparator")
@@ -60,6 +64,8 @@ class GevicePrefer:
self.checkbutton_model.connect ("toggled",self.show_column,config.COLUMN_NAME_MODEL_DEV,gevice)
self.checkbutton_serial.connect ("toggled",self.show_column,config.COLUMN_SERIAL_DEV,gevice)
self.checkbutton_comments.connect ("toggled",self.show_column,config.COLUMN_OBS_DEV,gevice)
+ self.checkbutton_location.connect ("toggled",self.show_column,config.COLUMN_LOCATION,gevice)
+ self.checkbutton_ports.connect ("toggled",self.show_column,config.COLUMN_PTAS_DISP,gevice)
self.window_prefer.connect ("delete-event",self.on_window_prefer_delete_event)
self.entry_backcolor.connect ("changed",self.on_entry_backcolor_changed,gevice)
self.entry_forecolor.connect ("changed",self.on_entry_forecolor_changed,gevice)
@@ -87,6 +93,8 @@ class GevicePrefer:
self.checkbutton_model.set_active(self.viewmodel)
self.checkbutton_serial.set_active(self.viewserial)
self.checkbutton_comments.set_active(self.viewcomments)
+ self.checkbutton_location.set_active(self.viewlocation)
+ self.checkbutton_ports.set_active(self.viewports)
self.entry_backcolor.set_text (self.backcolor)
self.entry_forecolor.set_text (self.forecolor)
self.entry_csvseparator.set_text (self.csvseparator)
@@ -245,6 +253,8 @@ class GevicePrefer:
self.viewmodel = client.get_bool('/apps/gevice/viewmodel')
self.viewserial = client.get_bool('/apps/gevice/viewserial')
self.viewcomments = client.get_bool('/apps/gevice/viewcomments')
+ self.viewlocation = client.get_bool('/apps/gevice/viewlocation')
+ self.viewports = client.get_bool('/apps/gevice/viewports')
self.diagip = client.get_bool('/apps/gevice/diagip')
self.diagmodel = client.get_bool('/apps/gevice/diagmodel')
self.diaglink = client.get_bool('/apps/gevice/diaglink')
@@ -297,6 +307,8 @@ class GevicePrefer:
self.viewmodel = self.checkbutton_model.get_active()
self.viewserial = self.checkbutton_serial.get_active()
self.viewcomments = self.checkbutton_comments.get_active()
+ self.viewlocation = self.checkbutton_location.get_active()
+ self.viewports = self.checkbutton_ports.get_active()
self.backcolor = self.entry_backcolor.get_text ()
self.forecolor = self.entry_forecolor.get_text ()
self.csvseparator = self.entry_csvseparator.get_text ()
@@ -312,6 +324,8 @@ class GevicePrefer:
client.set_bool('/apps/gevice/viewmodel', self.viewmodel)
client.set_bool('/apps/gevice/viewserial', self.viewserial)
client.set_bool('/apps/gevice/viewcomments', self.viewcomments)
+ client.set_bool('/apps/gevice/viewlocation', self.viewlocation)
+ client.set_bool('/apps/gevice/viewports', self.viewports)
client.set_string('/apps/gevice/backcolor', self.backcolor)
client.set_string('/apps/gevice/forecolor', self.forecolor)
client.set_string('/apps/gevice/csvseparator', self.csvseparator)
@@ -335,7 +349,7 @@ class GevicePrefer:
def show_column (self,checkbutton,column,gevice):
st = checkbutton.get_active()
tcl = gevice.gmodel.treeview.get_column (column)
-
+
if (st):
tcl.set_visible (True)
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]