Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rpms/sugar/0096-au-1122-sl-3343-If-the-journal-is-in-editing-mode-ba.patch
blob: 2cec7e064b2395ab4008ae4e4fe822b15ea442cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From eb6f417068f93a0330edd34dc3bb69931851a22c Mon Sep 17 00:00:00 2001
From: Ajay Garg <ajay@activitycentral.com>
Date: Sun, 4 Mar 2012 20:48:21 +0530
Subject: [PATCH] au#1122, sl#3343: If the journal is in editing mode
                                   (batch-operations mode), de-sensitize any newly mounted
                                   drive button in the bottom-panelframe.
Organization: Sugar Labs Foundation
Signed-off-by: Ajay Garg <ajay@activitycentral.com>
---

Note that, this patch needs to be applied, after applying the patch at ::

(Commit Link)
http://git.sugarlabs.org/dextrose/mainline/commit/22ee61af567acba7ee5fee1f656804a19e561684

(Patchwork Link)
http://patchwork.sugarlabs.org/patch/1205/


 src/jarabe/journal/journalactivity.py |    3 +++
 src/jarabe/journal/volumestoolbar.py  |    7 +++++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/jarabe/journal/journalactivity.py b/src/jarabe/journal/journalactivity.py
index 2e044fc..fa308cd 100644
--- a/src/jarabe/journal/journalactivity.py
+++ b/src/jarabe/journal/journalactivity.py
@@ -482,6 +482,9 @@ class JournalActivity(JournalWindow):
 
         return metadata_list
 
+    def is_editing_mode_present(self):
+        return self._editing_mode
+
 
 def get_journal():
     global _journal
diff --git a/src/jarabe/journal/volumestoolbar.py b/src/jarabe/journal/volumestoolbar.py
index c591cc4..94914e6 100644
--- a/src/jarabe/journal/volumestoolbar.py
+++ b/src/jarabe/journal/volumestoolbar.py
@@ -254,6 +254,13 @@ class VolumesToolbar(gtk.Toolbar):
         button.connect('volume-error', self.__volume_error_cb)
         position = self.get_item_index(self._volume_buttons[-1]) + 1
         self.insert(button, position)
+
+        # If the journal-view is in editing mode, ensure that the newly
+        # mounted-drive-button is de-sensitized.
+        from jarabe.journal.journalactivity import get_journal
+        if get_journal().is_editing_mode_present():
+            button.set_sensitive(False)
+
         button.show()
 
         self._volume_buttons.append(button)
-- 
1.7.4.4