Merge lp:~aniket-deole/switchboard/bug-fix into lp:~elementary-pantheon/switchboard/switchboard

Proposed by Cody Garver
Status: Rejected
Rejected by: David Gomes
Proposed branch: lp:~aniket-deole/switchboard/bug-fix
Merge into: lp:~elementary-pantheon/switchboard/switchboard
Diff against target: 186 lines (+90/-3) (has conflicts)
3 files modified
CMakeLists.txt (+1/-0)
src/Buttons.vala (+50/-0)
src/Switchboard.vala (+39/-3)
Text conflict in src/Switchboard.vala
To merge this branch: bzr merge lp:~aniket-deole/switchboard/bug-fix
Reviewer Review Type Date Requested Status
Sergey "Shnatsel" Davidoff (community) Needs Fixing
Danielle Foré Approve
Review via email: mp+194643@code.launchpad.net

Commit message

Use AppCenter style button instead of arrow to fix bug #1039269

To post a comment you must log in.
Revision history for this message
Danielle Foré (danrabbit) wrote :

Looks good on design side. Just needs code approval :)

review: Approve
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

Things like "<<<<<<< TREE" should not creep into the diff - they are Bazaar conflict markers, which the conflict should be resolved before committing. The code in its current state is not workable.

See http://doc.bazaar.canonical.com/beta/en/user-guide/resolving_conflicts.html for information on resolving conflicts.

review: Needs Fixing
Revision history for this message
Aniket Deole (aniket-deole) wrote :

I updated my local repo to the latest from lp:switchboard using "bzr merge" and now it requires gtk 3.6. But I'm still on Luna which has 3.4! Any help ?

Revision history for this message
Aniket Deole (aniket-deole) wrote :

"Any help" as in... Can I solve this without upgrading / getting all the Isis stuff ?

Revision history for this message
David Gomes (davidgomes) wrote :

Unmerged revisions

401. By Aniket Deole

Modified Back button related to bug 1039269.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-09-30 06:42:11 +0000
+++ CMakeLists.txt 2013-11-10 18:40:27 +0000
@@ -74,6 +74,7 @@
74 src/Resources.vala74 src/Resources.vala
75 src/DesktopLauncher.vala75 src/DesktopLauncher.vala
76 src/EmbeddedAlert.vala76 src/EmbeddedAlert.vala
77 src/Buttons.vala
77PACKAGES78PACKAGES
78 granite79 granite
79 gee-1.080 gee-1.0
8081
=== added file 'src/Buttons.vala'
--- src/Buttons.vala 1970-01-01 00:00:00 +0000
+++ src/Buttons.vala 2013-11-10 18:40:27 +0000
@@ -0,0 +1,50 @@
1/***
2 BEGIN LICENSE
3
4 Copyright (C) 2012-2013 Mario Guerriero <mario@elementaryos.org>
5 This program is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Lesser General Public License version 3, as
7 published by the Free Software Foundation.
8
9 This program is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranties of
11 MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12 PURPOSE. See the GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with this program. If not, see <http://www.gnu.org/licenses>
16
17 END LICENSE
18***/
19
20namespace Switchboard {
21 public class NavigationButton : Gtk.Button {
22
23 private Gtk.Label text;
24
25 public NavigationButton () {
26 can_focus = false;
27 valign = Gtk.Align.CENTER;
28 vexpand = false;
29
30 Gtk.Box button_b = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
31 var icon = new Gtk.Image.from_icon_name ("go-previous-symbolic",
32 Gtk.IconSize.MENU);
33 text = new Gtk.Label ("");
34
35 button_b.pack_start (icon, true, true, 2);
36 button_b.pack_start (text, true, true, 2);
37
38 this.add (button_b);
39 }
40
41 public string get_text () {
42 return text.label;
43 }
44
45 public void set_text (string text) {
46 this.text.label = text;
47 }
48
49 }
50}
051
=== modified file 'src/Switchboard.vala'
--- src/Switchboard.vala 2013-09-26 08:05:15 +0000
+++ src/Switchboard.vala 2013-11-10 18:40:27 +0000
@@ -45,7 +45,7 @@
45 Gtk.Label progress_label;45 Gtk.Label progress_label;
46 Gtk.SearchEntry search_box;46 Gtk.SearchEntry search_box;
47 Gtk.Toolbar toolbar;47 Gtk.Toolbar toolbar;
48 Gtk.ToolButton navigation_button;48 Switchboard.NavigationButton navigation_button;
49 // Public so we can hide it after show_all()49 // Public so we can hide it after show_all()
50 public Gtk.ToolItem progress_toolitem;50 public Gtk.ToolItem progress_toolitem;
51 // These two wrap the progress bar51 // These two wrap the progress bar
@@ -75,6 +75,8 @@
75 string search_box_buffer = "";75 string search_box_buffer = "";
7676
77 private const string[] SUPPORTED_GETTEXT_DOMAINS_KEYS = {"X-Ubuntu-Gettext-Domain", "X-GNOME-Gettext-Domain"};77 private const string[] SUPPORTED_GETTEXT_DOMAINS_KEYS = {"X-Ubuntu-Gettext-Domain", "X-GNOME-Gettext-Domain"};
78
79 string all_settings_label = _("All Settings");
7880
79 public SwitchboardApp () {81 public SwitchboardApp () {
80 }82 }
@@ -149,6 +151,8 @@
149 category_view.recalculate_columns (width);151 category_view.recalculate_columns (width);
150 });152 });
151153
154 navigation_button.hide ();
155
152 foreach (var label in category_view.category_labels.values)156 foreach (var label in category_view.category_labels.values)
153 label.hide ();157 label.hide ();
154 foreach (var view in category_view.category_views.values)158 foreach (var view in category_view.category_views.values)
@@ -243,8 +247,14 @@
243 247
244 // ensure the button is sensitive; it might be the first plug loaded248 // ensure the button is sensitive; it might be the first plug loaded
245 if (!@extern) {249 if (!@extern) {
250<<<<<<< TREE
246 navigation_button.set_sensitive(true);251 navigation_button.set_sensitive(true);
247 navigation_button.set_icon_name ("go-home");252 navigation_button.set_icon_name ("go-home");
253=======
254 navigation_button.set_sensitive (true);
255 navigation_button.set_text (all_settings_label);
256 navigation_button.show ();
257>>>>>>> MERGE-SOURCE
248 current_plug["title"] = title;258 current_plug["title"] = title;
249 current_plug["executable"] = executable;259 current_plug["executable"] = executable;
250 switch_to_socket ();260 switch_to_socket ();
@@ -252,8 +262,14 @@
252 }262 }
253 } catch { warning(_("Failed to launch plug: title %s | executable %s"), title, executable); }263 } catch { warning(_("Failed to launch plug: title %s | executable %s"), title, executable); }
254 } else {264 } else {
265<<<<<<< TREE
255 navigation_button.set_sensitive(true);266 navigation_button.set_sensitive(true);
256 navigation_button.set_icon_name ("go-home");267 navigation_button.set_icon_name ("go-home");
268=======
269 navigation_button.set_sensitive (true);
270 navigation_button.set_text (all_settings_label);
271 navigation_button.show ();
272>>>>>>> MERGE-SOURCE
257 }273 }
258 274
259 if (@extern) {275 if (@extern) {
@@ -268,15 +284,28 @@
268284
269 // Handles clicking the navigation button285 // Handles clicking the navigation button
270 void handle_navigation_button_clicked () {286 void handle_navigation_button_clicked () {
287<<<<<<< TREE
271 string icon_name = navigation_button.get_icon_name ();288 string icon_name = navigation_button.get_icon_name ();
272 if (icon_name == "go-home") {289 if (icon_name == "go-home") {
290=======
291 if (navigation_button.get_text () != current_plug["title"]) {
292>>>>>>> MERGE-SOURCE
273 switch_to_icons();293 switch_to_icons();
294<<<<<<< TREE
274 navigation_button.set_icon_name ("go-previous");295 navigation_button.set_icon_name ("go-previous");
296=======
297 navigation_button.set_text (current_plug["title"]);
298>>>>>>> MERGE-SOURCE
275 }299 }
276 else {300 else {
277 load_plug (current_plug["title"], current_plug["executable"], current_plug["extern"] == "1");301 load_plug (current_plug["title"], current_plug["executable"], current_plug["extern"] == "1");
302<<<<<<< TREE
278 navigation_button.set_icon_name ("go-home");303 navigation_button.set_icon_name ("go-home");
279 }304 }
305=======
306 navigation_button.set_text (all_settings_label);
307 }
308>>>>>>> MERGE-SOURCE
280 }309 }
281310
282 // Switches to the socket view311 // Switches to the socket view
@@ -502,6 +531,7 @@
502 search_box_text_changed();531 search_box_text_changed();
503 });532 });
504 search_box.sensitive = (count_plugs () > 0);533 search_box.sensitive = (count_plugs () > 0);
534 search_box.margin = 5;
505 var find_toolitem = new Gtk.ToolItem ();535 var find_toolitem = new Gtk.ToolItem ();
506 find_toolitem.add(search_box);536 find_toolitem.add(search_box);
507 find_toolitem.margin_right = 6;537 find_toolitem.margin_right = 6;
@@ -516,13 +546,19 @@
516 });546 });
517547
518 // Nav button548 // Nav button
549<<<<<<< TREE
519 navigation_button = new Gtk.ToolButton (null, null);550 navigation_button = new Gtk.ToolButton (null, null);
520 navigation_button.set_icon_name ("go-previous");551 navigation_button.set_icon_name ("go-previous");
552=======
553 navigation_button = new NavigationButton ();
554>>>>>>> MERGE-SOURCE
521 navigation_button.clicked.connect (handle_navigation_button_clicked);555 navigation_button.clicked.connect (handle_navigation_button_clicked);
522 navigation_button.set_sensitive(false);556 navigation_button.margin = 5;
523557
524 // Add everything to the toolbar558 // Add everything to the toolbar
525 toolbar.insert (navigation_button, -1);559 Gtk.ToolItem tool = new Gtk.ToolItem ();
560 tool.add (navigation_button);
561 toolbar.insert (tool, -1);
526 toolbar.insert (lspace, -1);562 toolbar.insert (lspace, -1);
527 toolbar.insert (progress_toolitem, -1);563 toolbar.insert (progress_toolitem, -1);
528 toolbar.insert (rspace, -1);564 toolbar.insert (rspace, -1);

Subscribers

People subscribed via source and target branches

to all changes: