Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjay Garg <ajay@activitycentral.com>2012-09-18 17:50:29 (GMT)
committer Ajay Garg <ajay@activitycentral.com>2012-09-18 17:50:29 (GMT)
commite417921a4fda4774ecba7c11646ea09ab1efe8d7 (patch)
tree006027aab02e5cc69824449e84b30d1b5314094a
parentaef0f8bd30e8edc6d4c83f12b5ba47964539909d (diff)
sdxo#2343, sdxo#2344: Disable "Start" and "Erase" buttons for DetailView of remote-shares.
-rw-r--r--rpms/sugar/0141-sdxo-2343-sdxo-2344-Disable-Start-and-Erase-buttons-.patch100
1 files changed, 100 insertions, 0 deletions
diff --git a/rpms/sugar/0141-sdxo-2343-sdxo-2344-Disable-Start-and-Erase-buttons-.patch b/rpms/sugar/0141-sdxo-2343-sdxo-2344-Disable-Start-and-Erase-buttons-.patch
new file mode 100644
index 0000000..985efe4
--- /dev/null
+++ b/rpms/sugar/0141-sdxo-2343-sdxo-2344-Disable-Start-and-Erase-buttons-.patch
@@ -0,0 +1,100 @@
+From 821eb2dcd3f93e78da1ca07cd8978ae9bddebe42 Mon Sep 17 00:00:00 2001
+From: Ajay Garg <ajay@activitycentral.com>
+Date: Tue, 18 Sep 2012 23:18:18 +0530
+Subject: [PATCH] sdxo#2343, sdxo#2344: Disable "Start" and "Erase" buttons
+ for DetailView of remote-shares.
+Organization: Sugar Labs Foundation
+Signed-off-by: Ajay Garg <ajay@activitycentral.com>
+---
+ src/jarabe/journal/journalactivity.py | 4 ++++
+ src/jarabe/journal/journaltoolbox.py | 33 ++++++++++++++++++++++++++-------
+ 2 files changed, 30 insertions(+), 7 deletions(-)
+
+diff --git a/src/jarabe/journal/journalactivity.py b/src/jarabe/journal/journalactivity.py
+index f902027..3ecb97c 100644
+--- a/src/jarabe/journal/journalactivity.py
++++ b/src/jarabe/journal/journalactivity.py
+@@ -303,6 +303,10 @@ class JournalActivity(JournalWindow):
+ logging.debug('Selected volume: %r.', mount_point)
+ self._main_toolbox.search_toolbar.set_mount_point(mount_point)
+ set_mount_point(mount_point)
++
++ # Also, need to update the mount-point for Detail-View.
++ self._detail_toolbox.set_mount_point(mount_point)
++
+ self._main_toolbox.set_current_toolbar(0)
+
+ def __model_created_cb(self, sender, **kwargs):
+diff --git a/src/jarabe/journal/journaltoolbox.py b/src/jarabe/journal/journaltoolbox.py
+index b1c0cac..663497d 100644
+--- a/src/jarabe/journal/journaltoolbox.py
++++ b/src/jarabe/journal/journaltoolbox.py
+@@ -381,10 +381,17 @@ class DetailToolbox(Toolbox):
+ def __init__(self):
+ Toolbox.__init__(self)
+
+- self.entry_toolbar = EntryToolbar()
++ self.entry_toolbar = EntryToolbar(self)
+ self.add_toolbar('', self.entry_toolbar)
+ self.entry_toolbar.show()
+
++ def set_mount_point(self, mount_point):
++ self._mount_point = mount_point
++ self.entry_toolbar.set_sensitivity_of_icons()
++
++ def get_mount_point(self):
++ return self._mount_point
++
+
+ class EntryToolbar(gtk.Toolbar):
+ __gsignals__ = {
+@@ -392,9 +399,10 @@ class EntryToolbar(gtk.Toolbar):
+ ([str, str])),
+ }
+
+- def __init__(self):
++ def __init__(self, detail_toolbox):
+ gtk.Toolbar.__init__(self)
+
++ self._detail_toolbox = detail_toolbox
+ self._metadata = None
+ self._temp_file_path = None
+
+@@ -425,11 +433,11 @@ class EntryToolbar(gtk.Toolbar):
+ self.add(separator)
+ separator.show()
+
+- erase_button = ToolButton('list-remove')
+- erase_button.set_tooltip(_('Erase'))
+- erase_button.connect('clicked', self._erase_button_clicked_cb)
+- self.add(erase_button)
+- erase_button.show()
++ self._erase_button = ToolButton('list-remove')
++ self._erase_button.set_tooltip(_('Erase'))
++ self._erase_button.connect('clicked', self._erase_button_clicked_cb)
++ self.add(self._erase_button)
++ self._erase_button.show()
+
+ def set_metadata(self, metadata):
+ self._metadata = metadata
+@@ -437,6 +445,17 @@ class EntryToolbar(gtk.Toolbar):
+ self._refresh_duplicate_palette()
+ self._refresh_resume_palette()
+
++ def set_sensitivity_of_icons(self):
++ mount_point = self._detail_toolbox.get_mount_point()
++ if model.is_mount_point_for_locally_mounted_remote_share(mount_point):
++ sensitivity = False
++ else:
++ sensitivity = True
++
++ self._resume.set_sensitive(sensitivity)
++ self._duplicate.set_sensitive(sensitivity)
++ self._erase_button.set_sensitive(sensitivity)
++
+ def _resume_clicked_cb(self, button):
+ misc.resume(self._metadata)
+
+--
+1.7.4.4
+