Merge lp:~vikoadi/gala/independent-custom-command into lp:gala

Proposed by Viko Adi Rahmawan
Status: Rejected
Rejected by: Corentin Noël
Proposed branch: lp:~vikoadi/gala/independent-custom-command
Merge into: lp:gala
Diff against target: 119 lines (+41/-31)
3 files modified
data/org.pantheon.desktop.gala.gschema.xml.in.in (+20/-10)
src/Settings.vala (+5/-2)
src/WindowManager.vala (+16/-19)
To merge this branch: bzr merge lp:~vikoadi/gala/independent-custom-command
Reviewer Review Type Date Requested Status
Rico Tzschichholz Disapprove
Review via email: mp+227505@code.launchpad.net

Description of the change

use its own custom command for each hotcorner side, break one command for all side custom command

To post a comment you must log in.
Revision history for this message
Rico Tzschichholz (ricotz) wrote :

As discussed this is unlikely to happen.

review: Disapprove

Unmerged revisions

399. By Viko Adi Rahmawan

use its own custom command for each side, break previous configuration

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/org.pantheon.desktop.gala.gschema.xml.in.in'
2--- data/org.pantheon.desktop.gala.gschema.xml.in.in 2014-04-19 12:57:09 +0000
3+++ data/org.pantheon.desktop.gala.gschema.xml.in.in 2014-07-21 07:07:06 +0000
4@@ -41,15 +41,25 @@
5 <summary>Action for the bottom right corner</summary>
6 <description></description>
7 </key>
8- <key type="s" name="hotcorner-custom-command">
9- <default>''</default>
10- <summary>The command that will be executed for the hotcorner action 'custom-command' or multiple</summary>
11- <description>If you just put a single command, it will be used for every hotcorner assigned to
12- 'custom-command'. If you instead use the pattern
13- 'hotcorner-topleft:command;;hotcorner-bottomright:command' the specific commands will be used
14- per hotcorner. Possible identifiers are 'hotcorner-[topleft; topright; bottomleft; bottomright]'
15- followed by a ':' and then the command. ';;' is used as delimiter between command defintions.
16- </description>
17+ <key type="s" name="custom-command-topleft">
18+ <default>''</default>
19+ <summary>The command that will be executed for the topleft hotcorner action 'custom-command'</summary>
20+ <description></description>
21+ </key>
22+ <key type="s" name="custom-command-topright">
23+ <default>''</default>
24+ <summary>The command that will be executed for the topright hotcorner action 'custom-command' or multiple</summary>
25+ <description></description>
26+ </key>
27+ <key type="s" name="custom-command-bottomleft">
28+ <default>''</default>
29+ <summary>The command that will be executed for the bottomleft hotcorner action 'custom-command' or multiple</summary>
30+ <description></description>
31+ </key>
32+ <key type="s" name="custom-command-bottomright">
33+ <default>''</default>
34+ <summary>The command that will be executed for the bottomright hotcorner action 'custom-command' or multiple</summary>
35+ <description></description>
36 </key>
37 <key type="b" name="edge-tiling">
38 <default>true</default>
39@@ -213,4 +223,4 @@
40 <description>See normal-focused</description>
41 </key>
42 </schema>
43-</schemalist>
44+</schemalist>
45\ No newline at end of file
46
47=== modified file 'src/Settings.vala'
48--- src/Settings.vala 2014-04-19 12:57:09 +0000
49+++ src/Settings.vala 2014-07-21 07:07:06 +0000
50@@ -24,7 +24,10 @@
51 public string panel_main_menu_action { get; set; }
52 public string toggle_recording_action { get; set; }
53 public string overlay_action { get; set; }
54- public string hotcorner_custom_command { get; set; }
55+ public string custom_command_topleft { get; set; }
56+ public string custom_command_topright { get; set; }
57+ public string custom_command_bottomleft { get; set; }
58+ public string custom_command_bottomright { get; set; }
59 public string[] dock_names { get; set; }
60
61 public WindowOverviewType window_overview_type { get; set; }
62@@ -177,4 +180,4 @@
63 return instance;
64 }
65 }
66-}
67+}
68\ No newline at end of file
69
70=== modified file 'src/WindowManager.vala'
71--- src/WindowManager.vala 2014-07-16 22:47:36 +0000
72+++ src/WindowManager.vala 2014-07-21 07:07:06 +0000
73@@ -490,24 +490,21 @@
74 break;
75 case ActionType.CUSTOM_COMMAND:
76 string command = "";
77- var line = BehaviorSettings.get_default ().hotcorner_custom_command;
78- if (line == "")
79- return;
80-
81- var parts = line.split (";;");
82- // keep compatibility to old version where only one command was possible
83- if (parts.length == 1) {
84- command = line;
85- } else {
86- // find specific actions
87- var search = last_hotcorner.name;
88-
89- foreach (var part in parts) {
90- var details = part.split (":");
91- if (details[0] == search) {
92- command = details[1];
93- }
94- }
95+ switch (last_hotcorner.name){
96+ case "hotcorner-topleft":
97+ command = BehaviorSettings.get_default ().custom_command_topleft;
98+ break;
99+ case "hotcorner-topright":
100+ command = BehaviorSettings.get_default ().custom_command_topright;
101+ break;
102+ case "hotcorner-bottomleft":
103+ command = BehaviorSettings.get_default ().custom_command_bottomleft;
104+ break;
105+ case "hotcorner-bottomright":
106+ command = BehaviorSettings.get_default ().custom_command_bottomright;
107+ break;
108+ default:
109+ return;
110 }
111
112 try {
113@@ -1196,4 +1193,4 @@
114 public extern int x_handle_event (X.Event xevent);
115 [CCode (cname="clutter_x11_get_stage_window")]
116 public extern X.Window x_get_stage_window (Clutter.Actor stage);
117-}
118+}
119\ No newline at end of file

Subscribers

People subscribed via source and target branches