summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Heinlein <sebastian.heinlein@web.de>2006-03-12 22:22:37 +0100
committerSebastian Heinlein <sebastian.heinlein@web.de>2006-03-12 22:22:37 +0100
commitae65c0496cc2c0a2451fbe6d551b36d1dba503c4 (patch)
tree90d7e5b7f9fed1e62570e9d52b48c8d6d020e814
parentaa2600ccb1fcc37178ed70ea2a0261407a54170c (diff)
downloadpython-apt-ae65c0496cc2c0a2451fbe6d551b36d1dba503c4.tar.gz
* show a dialog that provides a button to reload the channel information if
the channels changed - the updating does not work at the moment. but the strings of the dialog are in before string freeze
-rw-r--r--SoftwareProperties/SoftwareProperties.py12
-rw-r--r--data/SoftwarePropertiesDialogs.glade129
2 files changed, 139 insertions, 2 deletions
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py
index f8fd45b9..95e5b5b3 100644
--- a/SoftwareProperties/SoftwareProperties.py
+++ b/SoftwareProperties/SoftwareProperties.py
@@ -320,13 +320,21 @@ class SoftwareProperties(SimpleGladeApp):
for i in cnf.List():
f.write("APT::Periodic::%s \"%s\";\n" % (i, cnf.FindI(i)))
f.close()
-
+
def save_sourceslist(self):
#location = "/etc/apt/sources.list"
#shutil.copy(location, location + ".save")
self.sourceslist.backup(".save")
self.sourceslist.save()
-
+ # show a dialog that a reload of the channel information is required
+ if self.modified == True:
+ #res = self.dialog_cache_outofdate.run()
+ #if res == gtk.RESPONSE_ACCEPT:
+ # self.window_main.set_sensitive(False)
+ # FIXME DO SOME SYNAPTIC MAGIC
+ # self.window_main.set_sensitive(True)
+ pass
+
def on_add_clicked(self, widget):
dialog = dialog_add.dialog_add(self.window_main, self.sourceslist,
self.datadir)
diff --git a/data/SoftwarePropertiesDialogs.glade b/data/SoftwarePropertiesDialogs.glade
index da1df02b..7dab0228 100644
--- a/data/SoftwarePropertiesDialogs.glade
+++ b/data/SoftwarePropertiesDialogs.glade
@@ -986,4 +986,133 @@ Source</property>
</child>
</widget>
+<widget class="GtkDialog" id="dialog_cache_outofdate">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="title" translatable="yes"></property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">False</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="skip_pager_hint">True</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+ <property name="has_separator">False</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox5">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area5">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_focus">True</property>
+ <property name="label" translatable="yes">_Reload</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-10</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-close</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-7</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox36">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkImage" id="image4">
+ <property name="visible">True</property>
+ <property name="stock">gtk-dialog-info</property>
+ <property name="icon_size">6</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label70">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;&lt;big&gt;The channel information is out-of-date&lt;/big&gt;&lt;/b&gt;
+
+You have to reload the channel information to install software and updates from newly added or changed channels.
+
+You need a working internet connection to continue.</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">True</property>
+ <property name="selectable">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>