Merge lp:~elementary-apps/pantheon-photos/remove-multitextentrydialog into lp:~pantheon-photos/pantheon-photos/trunk

Proposed by Danielle Foré
Status: Merged
Approved by: David Hewitt
Approved revision: 3164
Merged at revision: 3165
Proposed branch: lp:~elementary-apps/pantheon-photos/remove-multitextentrydialog
Merge into: lp:~pantheon-photos/pantheon-photos/trunk
Diff against target: 126 lines (+0/-100)
3 files modified
src/CMakeLists.txt (+0/-1)
src/Dialogs/Dialogs.vala (+0/-21)
src/Dialogs/MultiTextEntryDialog.vala (+0/-78)
To merge this branch: bzr merge lp:~elementary-apps/pantheon-photos/remove-multitextentrydialog
Reviewer Review Type Date Requested Status
Photos Devs Pending
Review via email: mp+317699@code.launchpad.net

Commit message

* Remove unused MultiTextEntryDialog.vala
* Dialogs.vala: Remove unused class MultiTextEntryDialogMediator

Description of the change

I guess this is dead code. Nothing seems to call it and the app compiles fine without it

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/CMakeLists.txt'
2--- src/CMakeLists.txt 2017-02-16 19:35:47 +0000
3+++ src/CMakeLists.txt 2017-02-18 02:44:04 +0000
4@@ -76,7 +76,6 @@
5 Dialogs/AdjustDateTimeDialog.vala
6 Dialogs/Dialogs.vala
7 Dialogs/ExportDialog.vala
8- Dialogs/MultiTextEntryDialog.vala
9 Dialogs/PreferencesDialog.vala
10 Dialogs/ProgressDialog.vala
11 Dialogs/TextEntryDialog.vala
12
13=== modified file 'src/Dialogs/Dialogs.vala'
14--- src/Dialogs/Dialogs.vala 2017-02-16 19:35:47 +0000
15+++ src/Dialogs/Dialogs.vala 2017-02-18 02:44:04 +0000
16@@ -631,27 +631,6 @@
17 }
18 }
19
20-public abstract class MultiTextEntryDialogMediator {
21- private MultiTextEntryDialog dialog;
22-
23- public MultiTextEntryDialogMediator (string title, string label, string? initial_text = null) {
24- Gtk.Builder builder = AppWindow.create_builder ();
25- dialog = new MultiTextEntryDialog ();
26- dialog.get_content_area ().add ((Gtk.Box) builder.get_object ("dialog-vbox4"));
27- dialog.set_builder (builder);
28- dialog.setup (on_modify_validate, title, label, initial_text);
29- }
30-
31- protected virtual bool on_modify_validate (string text) {
32- return true;
33- }
34-
35- protected string? _execute () {
36- return dialog.execute ();
37- }
38-}
39-
40-
41 // This method takes primary and secondary texts and returns ready-to-use pango markup
42 // for a HIG-compliant alert dialog. Please see
43 // http://library.gnome.org/devel/hig-book/2.32/windows-alert.html.en for details.
44
45=== removed file 'src/Dialogs/MultiTextEntryDialog.vala'
46--- src/Dialogs/MultiTextEntryDialog.vala 2017-02-16 19:35:47 +0000
47+++ src/Dialogs/MultiTextEntryDialog.vala 1970-01-01 00:00:00 +0000
48@@ -1,78 +0,0 @@
49-/*
50-* Copyright (c) 2009-2013 Yorba Foundation
51-* 2017 elementary LLC. (https://launchpad.net/pantheon-photos)
52-*
53-* This program is free software; you can redistribute it and/or
54-* modify it under the terms of the GNU Lesser General Public
55-* License as published by the Free Software Foundation; either
56-* version 2.1 of the License, or (at your option) any later version.
57-*
58-* This program is distributed in the hope that it will be useful,
59-* but WITHOUT ANY WARRANTY; without even the implied warranty of
60-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
61-* General Public License for more details.
62-*
63-* You should have received a copy of the GNU General Public
64-* License along with this program; if not, write to the
65-* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
66-* Boston, MA 02110-1301 USA
67-*/
68-
69-public class MultiTextEntryDialog : Gtk.Dialog {
70- public delegate bool OnModifyValidateType (string text);
71-
72- private unowned OnModifyValidateType on_modify_validate;
73- private Gtk.TextView entry;
74- private Gtk.Builder builder;
75- private Gtk.Button button1;
76- private Gtk.Button button2;
77- private Gtk.ButtonBox action_area_box;
78-
79- public void set_builder (Gtk.Builder builder) {
80- this.builder = builder;
81- }
82-
83- public void setup (OnModifyValidateType? modify_validate, string title, string label, string? initial_text) {
84- set_title (title);
85- set_resizable (true);
86- set_deletable (false);
87- set_default_size (500, 300);
88- set_parent_window (AppWindow.get_instance ().get_parent_window ());
89- set_transient_for (AppWindow.get_instance ());
90- on_modify_validate = modify_validate;
91-
92- Gtk.Label name_label = builder.get_object ("label9") as Gtk.Label;
93- name_label.set_text (label);
94-
95- Gtk.ScrolledWindow scrolled = builder.get_object ("scrolledwindow1") as Gtk.ScrolledWindow;
96- scrolled.set_shadow_type (Gtk.ShadowType.ETCHED_IN);
97-
98- entry = builder.get_object ("textview1") as Gtk.TextView;
99- entry.set_wrap_mode (Gtk.WrapMode.WORD);
100- entry.buffer = new Gtk.TextBuffer (null);
101- entry.buffer.text = (initial_text != null ? initial_text : "");
102-
103- entry.grab_focus ();
104-
105- action_area_box = (Gtk.ButtonBox) get_action_area ();
106- action_area_box.set_layout (Gtk.ButtonBoxStyle.END);
107-
108- button1 = (Gtk.Button) add_button (_ ("_Cancel"), Gtk.ResponseType.CANCEL);
109- button2 = (Gtk.Button) add_button (_ ("_Save"), Gtk.ResponseType.OK);
110-
111- set_has_resize_grip (true);
112- }
113-
114- public string? execute () {
115- string? text = null;
116-
117- show_all ();
118-
119- if (run () == Gtk.ResponseType.OK)
120- text = entry.buffer.text;
121-
122- destroy ();
123-
124- return text;
125- }
126-}

Subscribers

People subscribed via source and target branches