Merge lp:~evfool/synaptic/ancientfixes into lp:synaptic
- ancientfixes
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 2102 |
Proposed branch: | lp:~evfool/synaptic/ancientfixes |
Merge into: | lp:synaptic |
Diff against target: |
1282 lines (+274/-201) 49 files modified
common/rpackage.cc (+13/-0) common/rpackage.h (+1/-0) debian/control (+1/-1) gtk/gsynaptic.cc (+3/-3) gtk/gtkbuilder/dialog_change_version.ui (+0/-1) gtk/gtkbuilder/dialog_columns.ui (+0/-1) gtk/gtkbuilder/dialog_conffile.ui (+0/-1) gtk/gtkbuilder/dialog_disc_label.ui (+0/-1) gtk/gtkbuilder/dialog_download_error.ui (+0/-1) gtk/gtkbuilder/dialog_example.ui (+0/-1) gtk/gtkbuilder/dialog_new_repositroy.ui (+0/-1) gtk/gtkbuilder/dialog_quit.ui (+0/-1) gtk/gtkbuilder/dialog_task_descr.ui (+0/-1) gtk/gtkbuilder/dialog_unmet.ui (+0/-1) gtk/gtkbuilder/dialog_update_failed.ui (+0/-1) gtk/gtkbuilder/dialog_update_outdated.ui (+0/-1) gtk/gtkbuilder/dialog_upgrade.ui (+0/-1) gtk/gtkbuilder/dialog_welcome.ui (+0/-1) gtk/gtkbuilder/window_about.ui (+0/-2) gtk/gtkbuilder/window_changes.ui (+0/-1) gtk/gtkbuilder/window_details.ui (+6/-0) gtk/gtkbuilder/window_disc_name.ui (+0/-1) gtk/gtkbuilder/window_fetch.ui (+1/-2) gtk/gtkbuilder/window_filters.ui (+3/-6) gtk/gtkbuilder/window_find.ui (+0/-1) gtk/gtkbuilder/window_iconlegend.ui (+0/-1) gtk/gtkbuilder/window_logview.ui (+0/-1) gtk/gtkbuilder/window_main.ui (+1/-1) gtk/gtkbuilder/window_preferences.ui (+23/-75) gtk/gtkbuilder/window_rgdebinstall_progress.ui (+0/-1) gtk/gtkbuilder/window_rginstall_progress.ui (+0/-1) gtk/gtkbuilder/window_setopt.ui (+0/-1) gtk/gtkbuilder/window_summary.ui (+2/-2) gtk/gtkbuilder/window_tasks.ui (+0/-1) gtk/gtkbuilder/window_zvtinstallprogress.ui (+0/-1) gtk/rgdebinstallprogress.cc (+3/-3) gtk/rgfiltermanager.cc (+1/-1) gtk/rggtkbuilderwindow.cc (+18/-0) gtk/rggtkbuilderwindow.h (+1/-0) gtk/rgmainwindow.cc (+42/-47) gtk/rgpackagestatus.cc (+0/-27) gtk/rgpkgdetails.cc (+38/-1) gtk/rgpkgdetails.h (+1/-0) gtk/rgpreferenceswindow.cc (+4/-4) gtk/rgsummarywindow.cc (+1/-0) gtk/rguserdialog.cc (+8/-1) gtk/rgutils.cc (+97/-0) gtk/rgutils.h (+3/-0) gtk/rgwindow.cc (+3/-1) |
To merge this branch: | bzr merge lp:~evfool/synaptic/ancientfixes |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Sponsors | Pending | ||
synaptic-developers | Pending | ||
Review via email: mp+93134@code.launchpad.net |
Commit message
Description of the change
This branch fixes some minor issues (One commit/issue):
* Disables typeahead in summary dialog, as it doesn't do anything, so it's unnecesary (LP: #24319)
* Move up and Move down buttons in columns preferences changed to respect buttons_have_icons preference (LP: #66574)
* Set the title of the package properties dialog opened for the first time (it has not been set before, so it was synaptic the first time the dialog has been opened) (LP: #932495)
* Added a reload button to the repositories changed dialog (LP: #78987)
* Updated the wording of the expander on the download progress dialog to Show individual files" instead of "Show for individual files" (LP: #301428)
* Fixed inconsistencies between column namings in column headers and column visibility preferences (LP: #335723)
* Linkified maintainer label in the package properties dialog (LP: #321380)
* Added package name in the warning scaring you about breaking your system (LP: #63974)
* Added name of the application (Synaptic Package Manager) in the titleless dialog shown when starting without administrative privilegess (LP: #510261)
* Improved filter editing checkbox tooltips (LP: #790420)
* Made all the property values from the package properties dialog selectable (LP: #173464)
* Changed Package Properties accelerator from Ctrl+O to widely used (nautilus, eog, evince etc) Alt+Enter (LP: #933554)
* Hide the only download packages checkbox if there are no files to download (LP: #413453)
* Use the synaptic icon from the user's icon theme, or fall back to the old one if the current theme does not provide a synaptic icon (LP: #153755)
* Focus the Apply button by default. (LP: #488718)
* Removed log message from automatically installed item click (LP: #883984)
* Fixed delete filter button not working caused by a typo in the name of the button when getting it from the GtkBuilder object (LP: #779756)
* Added suggests tasksel as with tasksel installed synaptic provides additional functionality (LP: #605186)
* Fixes incorrect radiobutton handling in the proxy preferences (LP: #706262)
Michael Vogt (mvo) wrote : | # |
Michael Vogt (mvo) wrote : | # |
While doing the review I noticed another small issue:
The fix for bug #755548 is not ideal as the code supports multiple selection and its actually a quite
useful feature IMO. It does not work with the "space" key very well, so we would either need to find
a way to make "space" on multiple selections clear the selection and do nothing else (so that the second
space triggers the action). Or make the space trigger the best possible action on all selection.
Robert Roth (evfool) wrote : | # |
I have reverted that change, set back the selection type to multiple, to have at least the rest of the fixes merged, if they seem OK. Maybe I'll try to implement the feature you've suggested (space on multiple selections do something useful) later, or maybe someone else will pick up. Actually I was the one who reported the bug in question, and I was not aware that it does something useful :)
Sebastien Bacher (seb128) wrote : | # |
@mvo: should we merge that in or do you still have issues with the current version?
Adolfo Jayme Barrientos (fitojb) wrote : | # |
*fitoschido has poked you.* ;-)
Daniel Hartwig (wigs) wrote : | # |
Please reconsider this change:
* Hide the only download packages checkbox if there are no files
to download (LP: #413453)
because it may still be enabled from a previous run (see ::showAndConfirm). The check for “download size is nil” is too simple. You also do *not* want to automagically unset this some times and not others, this is very disruptive behaviour.
To keep things simple, I suggest to revert this change and close the associated bug.
=== modified file 'gtk/rgsummaryw
--- gtk/rgsummarywi
+++ gtk/rgsummarywi
@@ -393,6 +393,7 @@
lister-
+ gtk_widget_
#if 0
if (held) {
char *str = ngettext("%d package is locked\n",
Daniel Hartwig (wigs) wrote : | # |
Overall I think your work on these usability issues is great.
Michael Vogt (mvo) wrote : | # |
On Sun, Nov 11, 2012 at 02:57:19PM -0000, Daniel Hartwig wrote:
> Please reconsider this change:
>
> * Hide the only download packages checkbox if there are no files
> to download (LP: #413453)
>
> because it may still be enabled from a previous run (see ::showAndConfirm). The check for “download size is nil” is too simple. You also do *not* want to automagically unset this some times and not others, this is very disruptive behaviour.
>
> To keep things simple, I suggest to revert this change and close the associated bug.
Thanks Daniel, I think this is a valid concern, I reverted this for
now. I hope that is ok with you Robert, please let me know if you have
any alternative ideas, but it seems like its a relatively small change.
Cheers,
Michael
Robert Roth (evfool) wrote : | # |
Of course it's OK reverting, I have been thinking what I can do about that, that's why I haven't replied yet. But until we find a better solution, let's leave it as is. I haven't even found the bug report related to that change, although as far as I remember I have only committed bug-related changes there.
Daniel Hartwig (wigs) wrote : | # |
On 14 November 2012 20:12, Robert Roth <email address hidden> wrote:
> Of course it's OK reverting, I have been thinking what I can do
> about that, that's why I haven't replied yet. But until we find a
> better solution, let's leave it as is.
The current code in trunk does not work so well. See my previous
comment. It really should not be left as is.
The better solution here is one of:
- always keep the previous choice for download-only; or
- always unset download-only.
Package management is rather complex, it is not likely that there is
a good metric to decide when to unset this selection and when not—in a
way that a user can accurately anticipate.
Someone has reported that the availability of the option was
unexpected for them, in one situation. Does not mean that anything
more sensible can realisticly be done.
> I haven't even found the bug
> report related to that change, although as far as I remember I have
> only committed bug-related changes there.
Daniel Hartwig (wigs) wrote : | # |
On 17 November 2012 21:27, Daniel Hartwig <email address hidden> wrote:
> Package management is rather complex, it is not likely that there is
> a good metric to decide when to unset this selection and when not—in a
> way that a user can accurately anticipate.
For what its worth, we have had one or two similar reports against
aptitude, but what can you be expected to do when a user types:
$ aptitude install --download-only some-package
and some-package is already downloaded? Ignore --download-only?
Preview Diff
1 | === modified file 'common/rpackage.cc' |
2 | --- common/rpackage.cc 2012-03-20 15:43:53 +0000 |
3 | +++ common/rpackage.cc 2012-04-10 17:44:21 +0000 |
4 | @@ -154,6 +154,19 @@ |
5 | return ""; |
6 | } |
7 | |
8 | +const char *RPackage::homepage() |
9 | +{ |
10 | + static string _homepage; |
11 | + pkgCache::VerIterator ver = (*_depcache)[*_package].CandidateVerIter(*_depcache); |
12 | + if (!ver.end()) { |
13 | + pkgRecords::Parser & parser = _records->Lookup(ver.FileList()); |
14 | + _homepage = parser.Homepage(); |
15 | + return _homepage .c_str(); |
16 | + } |
17 | + return ""; |
18 | +} |
19 | + |
20 | + |
21 | string RPackage::arch() |
22 | { |
23 | pkgCache::VerIterator ver; |
24 | |
25 | === modified file 'common/rpackage.h' |
26 | --- common/rpackage.h 2012-01-31 22:11:17 +0000 |
27 | +++ common/rpackage.h 2012-04-10 17:44:21 +0000 |
28 | @@ -185,6 +185,7 @@ |
29 | string origin(); |
30 | |
31 | const char *maintainer(); |
32 | + const char *homepage(); |
33 | const char *vendor(); |
34 | |
35 | const char *installedVersion(); |
36 | |
37 | === modified file 'debian/control' |
38 | --- debian/control 2012-04-02 08:59:42 +0000 |
39 | +++ debian/control 2012-04-10 17:44:21 +0000 |
40 | @@ -13,7 +13,7 @@ |
41 | Depends: ${shlibs:Depends}, ${misc:Depends}, hicolor-icon-theme |
42 | Conflicts: menu (<< 2.1.11) |
43 | Recommends: gksu|kdebase-bin|policykit-1, libgtk2-perl (>= 1:1.130), rarian-compat, software-properties-gtk |
44 | -Suggests: dwww, menu, deborphan, apt-xapian-index |
45 | +Suggests: dwww, menu, deborphan, apt-xapian-index, tasksel |
46 | Description: Graphical package manager |
47 | Synaptic is a graphical package management tool based on GTK+ and APT. |
48 | Synaptic enables you to install, upgrade and remove software packages in |
49 | |
50 | === modified file 'gtk/gsynaptic.cc' |
51 | --- gtk/gsynaptic.cc 2011-11-10 16:31:25 +0000 |
52 | +++ gtk/gsynaptic.cc 2012-04-10 17:44:21 +0000 |
53 | @@ -427,10 +427,10 @@ |
54 | if (getuid() != 0) { |
55 | RGUserDialog userDialog; |
56 | userDialog.warning(g_strdup_printf("<b><big>%s</big></b>\n\n%s", |
57 | - _("Starting without administrative " |
58 | - "privileges"), |
59 | + _("Starting \"Synaptic Package Manager\" without " |
60 | + "administrative privileges"), |
61 | _("You will not be able to apply " |
62 | - "any changes. But you can still " |
63 | + "any changes, but you can still " |
64 | "export the marked changes or " |
65 | "create a download script " |
66 | "for them."))); |
67 | |
68 | === modified file 'gtk/gtkbuilder/dialog_change_version.ui' |
69 | --- gtk/gtkbuilder/dialog_change_version.ui 2010-10-06 15:22:41 +0000 |
70 | +++ gtk/gtkbuilder/dialog_change_version.ui 2012-04-10 17:44:21 +0000 |
71 | @@ -10,7 +10,6 @@ |
72 | <property name="modal">True</property> |
73 | <property name="resizable">False</property> |
74 | <property name="destroy_with_parent">False</property> |
75 | - <property name="icon">synaptic_mini.xpm</property> |
76 | <property name="has_separator">False</property> |
77 | <child internal-child="vbox"> |
78 | <object class="GtkVBox" id="dialog-vbox1"> |
79 | |
80 | === modified file 'gtk/gtkbuilder/dialog_columns.ui' |
81 | --- gtk/gtkbuilder/dialog_columns.ui 2010-10-06 15:22:41 +0000 |
82 | +++ gtk/gtkbuilder/dialog_columns.ui 2012-04-10 17:44:21 +0000 |
83 | @@ -10,7 +10,6 @@ |
84 | <property name="modal">False</property> |
85 | <property name="resizable">True</property> |
86 | <property name="destroy_with_parent">False</property> |
87 | - <property name="icon">synaptic_mini.xpm</property> |
88 | <property name="has_separator">False</property> |
89 | <child internal-child="vbox"> |
90 | <object class="GtkVBox" id="dialog-vbox1"> |
91 | |
92 | === modified file 'gtk/gtkbuilder/dialog_conffile.ui' |
93 | --- gtk/gtkbuilder/dialog_conffile.ui 2010-10-06 15:22:41 +0000 |
94 | +++ gtk/gtkbuilder/dialog_conffile.ui 2012-04-10 17:44:21 +0000 |
95 | @@ -10,7 +10,6 @@ |
96 | <property name="modal">True</property> |
97 | <property name="resizable">True</property> |
98 | <property name="destroy_with_parent">False</property> |
99 | - <property name="icon">synaptic_mini.xpm</property> |
100 | <property name="decorated">True</property> |
101 | <property name="skip_taskbar_hint">False</property> |
102 | <property name="skip_pager_hint">False</property> |
103 | |
104 | === modified file 'gtk/gtkbuilder/dialog_disc_label.ui' |
105 | --- gtk/gtkbuilder/dialog_disc_label.ui 2010-10-06 15:22:41 +0000 |
106 | +++ gtk/gtkbuilder/dialog_disc_label.ui 2012-04-10 17:44:21 +0000 |
107 | @@ -10,7 +10,6 @@ |
108 | <property name="modal">True</property> |
109 | <property name="resizable">False</property> |
110 | <property name="destroy_with_parent">False</property> |
111 | - <property name="icon">synaptic_mini.xpm</property> |
112 | <property name="has_separator">False</property> |
113 | <child internal-child="vbox"> |
114 | <object class="GtkVBox" id="dialog-vbox1"> |
115 | |
116 | === modified file 'gtk/gtkbuilder/dialog_download_error.ui' |
117 | --- gtk/gtkbuilder/dialog_download_error.ui 2010-10-06 15:22:41 +0000 |
118 | +++ gtk/gtkbuilder/dialog_download_error.ui 2012-04-10 17:44:21 +0000 |
119 | @@ -12,7 +12,6 @@ |
120 | <property name="default_height">350</property> |
121 | <property name="resizable">True</property> |
122 | <property name="destroy_with_parent">False</property> |
123 | - <property name="icon">synaptic_mini.xpm</property> |
124 | <property name="decorated">True</property> |
125 | <property name="skip_taskbar_hint">False</property> |
126 | <property name="skip_pager_hint">False</property> |
127 | |
128 | === modified file 'gtk/gtkbuilder/dialog_example.ui' |
129 | --- gtk/gtkbuilder/dialog_example.ui 2010-10-06 15:22:41 +0000 |
130 | +++ gtk/gtkbuilder/dialog_example.ui 2012-04-10 17:44:21 +0000 |
131 | @@ -10,7 +10,6 @@ |
132 | <property name="modal">True</property> |
133 | <property name="resizable">False</property> |
134 | <property name="destroy_with_parent">False</property> |
135 | - <property name="icon">synaptic_mini.xpm</property> |
136 | <property name="decorated">True</property> |
137 | <property name="skip_taskbar_hint">False</property> |
138 | <property name="skip_pager_hint">False</property> |
139 | |
140 | === modified file 'gtk/gtkbuilder/dialog_new_repositroy.ui' |
141 | --- gtk/gtkbuilder/dialog_new_repositroy.ui 2010-10-06 15:22:41 +0000 |
142 | +++ gtk/gtkbuilder/dialog_new_repositroy.ui 2012-04-10 17:44:21 +0000 |
143 | @@ -10,7 +10,6 @@ |
144 | <property name="modal">False</property> |
145 | <property name="resizable">False</property> |
146 | <property name="destroy_with_parent">False</property> |
147 | - <property name="icon">synaptic_mini.xpm</property> |
148 | <child> |
149 | <object class="GtkVBox" id="vbox1"> |
150 | <property name="visible">True</property> |
151 | |
152 | === modified file 'gtk/gtkbuilder/dialog_quit.ui' |
153 | --- gtk/gtkbuilder/dialog_quit.ui 2010-10-06 15:22:41 +0000 |
154 | +++ gtk/gtkbuilder/dialog_quit.ui 2012-04-10 17:44:21 +0000 |
155 | @@ -10,7 +10,6 @@ |
156 | <property name="modal">False</property> |
157 | <property name="resizable">False</property> |
158 | <property name="destroy_with_parent">False</property> |
159 | - <property name="icon">synaptic_mini.xpm</property> |
160 | <property name="has_separator">False</property> |
161 | <child internal-child="vbox"> |
162 | <object class="GtkVBox" id="dialog-vbox1"> |
163 | |
164 | === modified file 'gtk/gtkbuilder/dialog_task_descr.ui' |
165 | --- gtk/gtkbuilder/dialog_task_descr.ui 2010-10-06 15:22:41 +0000 |
166 | +++ gtk/gtkbuilder/dialog_task_descr.ui 2012-04-10 17:44:21 +0000 |
167 | @@ -12,7 +12,6 @@ |
168 | <property name="modal">True</property> |
169 | <property name="resizable">True</property> |
170 | <property name="destroy_with_parent">False</property> |
171 | - <property name="icon">synaptic_mini.xpm</property> |
172 | <property name="has_separator">False</property> |
173 | <child internal-child="vbox"> |
174 | <object class="GtkVBox" id="dialog-vbox1"> |
175 | |
176 | === modified file 'gtk/gtkbuilder/dialog_unmet.ui' |
177 | --- gtk/gtkbuilder/dialog_unmet.ui 2010-10-06 15:22:41 +0000 |
178 | +++ gtk/gtkbuilder/dialog_unmet.ui 2012-04-10 17:44:21 +0000 |
179 | @@ -12,7 +12,6 @@ |
180 | <property name="default_height">350</property> |
181 | <property name="resizable">True</property> |
182 | <property name="destroy_with_parent">False</property> |
183 | - <property name="icon">synaptic_mini.xpm</property> |
184 | <property name="has_separator">False</property> |
185 | <child internal-child="vbox"> |
186 | <object class="GtkVBox" id="dialog-vbox1"> |
187 | |
188 | === modified file 'gtk/gtkbuilder/dialog_update_failed.ui' |
189 | --- gtk/gtkbuilder/dialog_update_failed.ui 2010-10-06 15:22:41 +0000 |
190 | +++ gtk/gtkbuilder/dialog_update_failed.ui 2012-04-10 17:44:21 +0000 |
191 | @@ -12,7 +12,6 @@ |
192 | <property name="default_height">350</property> |
193 | <property name="resizable">True</property> |
194 | <property name="destroy_with_parent">False</property> |
195 | - <property name="icon">synaptic_mini.xpm</property> |
196 | <property name="has_separator">False</property> |
197 | <child internal-child="vbox"> |
198 | <object class="GtkVBox" id="dialog-vbox1"> |
199 | |
200 | === modified file 'gtk/gtkbuilder/dialog_update_outdated.ui' |
201 | --- gtk/gtkbuilder/dialog_update_outdated.ui 2010-10-06 15:22:41 +0000 |
202 | +++ gtk/gtkbuilder/dialog_update_outdated.ui 2012-04-10 17:44:21 +0000 |
203 | @@ -10,7 +10,6 @@ |
204 | <property name="modal">False</property> |
205 | <property name="resizable">False</property> |
206 | <property name="destroy_with_parent">False</property> |
207 | - <property name="icon">synaptic_mini.xpm</property> |
208 | <property name="decorated">True</property> |
209 | <property name="skip_taskbar_hint">False</property> |
210 | <property name="skip_pager_hint">False</property> |
211 | |
212 | === modified file 'gtk/gtkbuilder/dialog_upgrade.ui' |
213 | --- gtk/gtkbuilder/dialog_upgrade.ui 2010-10-06 15:22:41 +0000 |
214 | +++ gtk/gtkbuilder/dialog_upgrade.ui 2012-04-10 17:44:21 +0000 |
215 | @@ -10,7 +10,6 @@ |
216 | <property name="modal">False</property> |
217 | <property name="resizable">False</property> |
218 | <property name="destroy_with_parent">False</property> |
219 | - <property name="icon">synaptic_mini.xpm</property> |
220 | <property name="decorated">True</property> |
221 | <property name="skip_taskbar_hint">False</property> |
222 | <property name="skip_pager_hint">False</property> |
223 | |
224 | === modified file 'gtk/gtkbuilder/dialog_welcome.ui' |
225 | --- gtk/gtkbuilder/dialog_welcome.ui 2010-10-07 22:23:12 +0000 |
226 | +++ gtk/gtkbuilder/dialog_welcome.ui 2012-04-10 17:44:21 +0000 |
227 | @@ -10,7 +10,6 @@ |
228 | <property name="modal">False</property> |
229 | <property name="resizable">False</property> |
230 | <property name="destroy_with_parent">False</property> |
231 | - <property name="icon">synaptic_mini.xpm</property> |
232 | <property name="decorated">True</property> |
233 | <property name="skip_taskbar_hint">False</property> |
234 | <property name="skip_pager_hint">False</property> |
235 | |
236 | === modified file 'gtk/gtkbuilder/window_about.ui' |
237 | --- gtk/gtkbuilder/window_about.ui 2012-03-13 08:48:27 +0000 |
238 | +++ gtk/gtkbuilder/window_about.ui 2012-04-10 17:44:21 +0000 |
239 | @@ -10,7 +10,6 @@ |
240 | <property name="modal">False</property> |
241 | <property name="resizable">False</property> |
242 | <property name="destroy_with_parent">False</property> |
243 | - <property name="icon">synaptic_mini.xpm</property> |
244 | <property name="decorated">True</property> |
245 | <property name="skip_taskbar_hint">False</property> |
246 | <property name="skip_pager_hint">False</property> |
247 | @@ -269,7 +268,6 @@ |
248 | <property name="modal">False</property> |
249 | <property name="resizable">False</property> |
250 | <property name="destroy_with_parent">False</property> |
251 | - <property name="icon">synaptic_mini.xpm</property> |
252 | <property name="decorated">True</property> |
253 | <property name="skip_taskbar_hint">False</property> |
254 | <property name="skip_pager_hint">False</property> |
255 | |
256 | === modified file 'gtk/gtkbuilder/window_changes.ui' |
257 | --- gtk/gtkbuilder/window_changes.ui 2010-10-06 15:22:41 +0000 |
258 | +++ gtk/gtkbuilder/window_changes.ui 2012-04-10 17:44:21 +0000 |
259 | @@ -12,7 +12,6 @@ |
260 | <property name="default_height">350</property> |
261 | <property name="resizable">True</property> |
262 | <property name="destroy_with_parent">False</property> |
263 | - <property name="icon">synaptic_mini.xpm</property> |
264 | <property name="decorated">True</property> |
265 | <property name="skip_taskbar_hint">True</property> |
266 | <property name="skip_pager_hint">False</property> |
267 | |
268 | === modified file 'gtk/gtkbuilder/window_details.ui' |
269 | --- gtk/gtkbuilder/window_details.ui 2010-11-12 21:51:18 +0000 |
270 | +++ gtk/gtkbuilder/window_details.ui 2012-04-10 17:44:21 +0000 |
271 | @@ -49,6 +49,7 @@ |
272 | <property name="visible">True</property> |
273 | <property name="xalign">0</property> |
274 | <property name="use_markup">True</property> |
275 | + <property name="selectable">True</property> |
276 | </object> |
277 | <packing> |
278 | <property name="left_attach">1</property> |
279 | @@ -94,6 +95,7 @@ |
280 | <object class="GtkLabel" id="label_priority"> |
281 | <property name="visible">True</property> |
282 | <property name="xalign">0</property> |
283 | + <property name="selectable">True</property> |
284 | </object> |
285 | <packing> |
286 | <property name="left_attach">1</property> |
287 | @@ -154,6 +156,7 @@ |
288 | <child> |
289 | <object class="GtkLabel" id="label_state"> |
290 | <property name="visible">True</property> |
291 | + <property name="selectable">True</property> |
292 | </object> |
293 | <packing> |
294 | <property name="expand">False</property> |
295 | @@ -328,6 +331,7 @@ |
296 | <object class="GtkLabel" id="label_installed_size"> |
297 | <property name="visible">True</property> |
298 | <property name="xalign">0</property> |
299 | + <property name="selectable">True</property> |
300 | </object> |
301 | <packing> |
302 | <property name="left_attach">1</property> |
303 | @@ -447,6 +451,7 @@ |
304 | <object class="GtkLabel" id="label_latest_size"> |
305 | <property name="visible">True</property> |
306 | <property name="xalign">0</property> |
307 | + <property name="selectable">True</property> |
308 | </object> |
309 | <packing> |
310 | <property name="left_attach">1</property> |
311 | @@ -461,6 +466,7 @@ |
312 | <object class="GtkLabel" id="label_latest_download_size"> |
313 | <property name="visible">True</property> |
314 | <property name="xalign">0</property> |
315 | + <property name="selectable">True</property> |
316 | </object> |
317 | <packing> |
318 | <property name="left_attach">1</property> |
319 | |
320 | === modified file 'gtk/gtkbuilder/window_disc_name.ui' |
321 | --- gtk/gtkbuilder/window_disc_name.ui 2010-10-06 15:22:41 +0000 |
322 | +++ gtk/gtkbuilder/window_disc_name.ui 2012-04-10 17:44:21 +0000 |
323 | @@ -10,7 +10,6 @@ |
324 | <property name="modal">True</property> |
325 | <property name="resizable">False</property> |
326 | <property name="destroy_with_parent">False</property> |
327 | - <property name="icon">synaptic_mini.xpm</property> |
328 | <child> |
329 | <object class="GtkVBox" id="vbox1"> |
330 | <property name="visible">True</property> |
331 | |
332 | === modified file 'gtk/gtkbuilder/window_fetch.ui' |
333 | --- gtk/gtkbuilder/window_fetch.ui 2010-10-06 15:22:41 +0000 |
334 | +++ gtk/gtkbuilder/window_fetch.ui 2012-04-10 17:44:21 +0000 |
335 | @@ -10,7 +10,6 @@ |
336 | <property name="modal">True</property> |
337 | <property name="resizable">True</property> |
338 | <property name="destroy_with_parent">False</property> |
339 | - <property name="icon">synaptic.xpm</property> |
340 | <property name="decorated">True</property> |
341 | <property name="skip_taskbar_hint">False</property> |
342 | <property name="skip_pager_hint">False</property> |
343 | @@ -148,7 +147,7 @@ |
344 | <child type="label"> |
345 | <object class="GtkLabel" id="label3"> |
346 | <property name="visible">True</property> |
347 | - <property name="label" translatable="yes">Show for individual files</property> |
348 | + <property name="label" translatable="yes">Show individual files</property> |
349 | <property name="use_underline">False</property> |
350 | <property name="use_markup">False</property> |
351 | <property name="justify">GTK_JUSTIFY_LEFT</property> |
352 | |
353 | === modified file 'gtk/gtkbuilder/window_filters.ui' |
354 | --- gtk/gtkbuilder/window_filters.ui 2010-11-08 23:02:53 +0000 |
355 | +++ gtk/gtkbuilder/window_filters.ui 2012-04-10 17:44:21 +0000 |
356 | @@ -48,7 +48,6 @@ |
357 | <property name="modal">True</property> |
358 | <property name="default_width">640</property> |
359 | <property name="default_height">480</property> |
360 | - <property name="icon">synaptic_mini.xpm</property> |
361 | <property name="type_hint">dialog</property> |
362 | <child internal-child="vbox"> |
363 | <object class="GtkVBox" id="dialog-vbox1"> |
364 | @@ -112,7 +111,6 @@ |
365 | <property name="can_default">True</property> |
366 | <property name="receives_default">False</property> |
367 | <property name="use_stock">True</property> |
368 | - <signal name="clicked" handler="on_button_filters_add_clicked" swapped="no"/> |
369 | </object> |
370 | <packing> |
371 | <property name="expand">False</property> |
372 | @@ -128,7 +126,6 @@ |
373 | <property name="can_default">True</property> |
374 | <property name="receives_default">False</property> |
375 | <property name="use_stock">True</property> |
376 | - <signal name="clicked" handler="on_button_filters_remove_clicked" swapped="no"/> |
377 | </object> |
378 | <packing> |
379 | <property name="expand">False</property> |
380 | @@ -533,7 +530,7 @@ |
381 | <property name="visible">True</property> |
382 | <property name="can_focus">True</property> |
383 | <property name="receives_default">False</property> |
384 | - <property name="tooltip_text" translatable="yes">Installed automatically as part of a dependency</property> |
385 | + <property name="tooltip_text" translatable="yes">Packages installed automatically as part of a dependency</property> |
386 | <property name="use_underline">True</property> |
387 | <property name="draw_indicator">True</property> |
388 | </object> |
389 | @@ -549,7 +546,7 @@ |
390 | <property name="visible">True</property> |
391 | <property name="can_focus">True</property> |
392 | <property name="receives_default">False</property> |
393 | - <property name="tooltip_text" translatable="yes">Automatic installed but no longer required by any other package</property> |
394 | + <property name="tooltip_text" translatable="yes">Packages installed automatically but no longer required by any other package</property> |
395 | <property name="use_underline">True</property> |
396 | <property name="draw_indicator">True</property> |
397 | </object> |
398 | @@ -581,7 +578,7 @@ |
399 | <property name="visible">True</property> |
400 | <property name="can_focus">True</property> |
401 | <property name="receives_default">False</property> |
402 | - <property name="tooltip_text" translatable="yes">Installed manually (not as a dependency by something else)</property> |
403 | + <property name="tooltip_text" translatable="yes">Packages installed manually (not as a dependency of something else)</property> |
404 | <property name="use_underline">True</property> |
405 | <property name="draw_indicator">True</property> |
406 | </object> |
407 | |
408 | === modified file 'gtk/gtkbuilder/window_find.ui' |
409 | --- gtk/gtkbuilder/window_find.ui 2010-11-12 19:32:38 +0000 |
410 | +++ gtk/gtkbuilder/window_find.ui 2012-04-10 17:44:21 +0000 |
411 | @@ -5,7 +5,6 @@ |
412 | <object class="GtkDialog" id="window_find"> |
413 | <property name="visible">True</property> |
414 | <property name="border_width">6</property> |
415 | - <property name="icon">synaptic_mini.xpm</property> |
416 | <property name="type_hint">dialog</property> |
417 | <child internal-child="vbox"> |
418 | <object class="GtkVBox" id="dialog-vbox2"> |
419 | |
420 | === modified file 'gtk/gtkbuilder/window_iconlegend.ui' |
421 | --- gtk/gtkbuilder/window_iconlegend.ui 2010-10-06 15:22:41 +0000 |
422 | +++ gtk/gtkbuilder/window_iconlegend.ui 2012-04-10 17:44:21 +0000 |
423 | @@ -10,7 +10,6 @@ |
424 | <property name="modal">False</property> |
425 | <property name="resizable">False</property> |
426 | <property name="destroy_with_parent">False</property> |
427 | - <property name="icon">synaptic_mini.xpm</property> |
428 | <property name="has_separator">False</property> |
429 | <child internal-child="vbox"> |
430 | <object class="GtkVBox" id="dialog-vbox1"> |
431 | |
432 | === modified file 'gtk/gtkbuilder/window_logview.ui' |
433 | --- gtk/gtkbuilder/window_logview.ui 2010-10-06 15:22:41 +0000 |
434 | +++ gtk/gtkbuilder/window_logview.ui 2012-04-10 17:44:21 +0000 |
435 | @@ -11,7 +11,6 @@ |
436 | <property name="default_height">400</property> |
437 | <property name="resizable">True</property> |
438 | <property name="destroy_with_parent">False</property> |
439 | - <property name="icon">synaptic_mini.xpm</property> |
440 | <property name="decorated">True</property> |
441 | <property name="skip_taskbar_hint">False</property> |
442 | <property name="skip_pager_hint">False</property> |
443 | |
444 | === modified file 'gtk/gtkbuilder/window_main.ui' |
445 | --- gtk/gtkbuilder/window_main.ui 2012-02-13 12:14:51 +0000 |
446 | +++ gtk/gtkbuilder/window_main.ui 2012-04-10 17:44:21 +0000 |
447 | @@ -543,7 +543,7 @@ |
448 | <property name="use_underline">True</property> |
449 | <property name="image">image16</property> |
450 | <property name="use_stock">False</property> |
451 | - <accelerator key="O" signal="activate" modifiers="GDK_CONTROL_MASK"/> |
452 | + <accelerator key="Return" signal="activate" modifiers="GDK_MOD1_MASK"/> |
453 | <signal name="activate" handler="on_button_details_clicked" swapped="no"/> |
454 | </object> |
455 | </child> |
456 | |
457 | === modified file 'gtk/gtkbuilder/window_preferences.ui' |
458 | --- gtk/gtkbuilder/window_preferences.ui 2011-02-09 13:25:14 +0000 |
459 | +++ gtk/gtkbuilder/window_preferences.ui 2012-04-10 17:44:21 +0000 |
460 | @@ -26,12 +26,21 @@ |
461 | <column type="gchararray"/> |
462 | </columns> |
463 | </object> |
464 | + <object class="GtkImage" id="move_down_image"> |
465 | + <property name="visible">True</property> |
466 | + <property name="can_focus">False</property> |
467 | + <property name="stock">gtk-go-down</property> |
468 | + </object> |
469 | + <object class="GtkImage" id="move_up_image"> |
470 | + <property name="visible">True</property> |
471 | + <property name="can_focus">False</property> |
472 | + <property name="stock">gtk-go-up</property> |
473 | + </object> |
474 | <object class="GtkWindow" id="window_preferences"> |
475 | <property name="title" translatable="yes">Preferences</property> |
476 | <property name="resizable">False</property> |
477 | <property name="modal">True</property> |
478 | <property name="window_position">center</property> |
479 | - <property name="icon">synaptic_mini.xpm</property> |
480 | <child> |
481 | <object class="GtkVBox" id="vbox8"> |
482 | <property name="visible">True</property> |
483 | @@ -515,49 +524,19 @@ |
484 | <child> |
485 | <object class="GtkVBox" id="vbox39"> |
486 | <property name="visible">True</property> |
487 | + <property name="can_focus">False</property> |
488 | <property name="spacing">6</property> |
489 | <child> |
490 | <object class="GtkButton" id="button_column_up"> |
491 | + <property name="label" translatable="yes">Move _Up</property> |
492 | + <property name="use_action_appearance">False</property> |
493 | <property name="visible">True</property> |
494 | <property name="can_focus">True</property> |
495 | <property name="receives_default">False</property> |
496 | - <signal name="clicked" handler="on_button_column_up_clicked"/> |
497 | - <child> |
498 | - <object class="GtkAlignment" id="alignment4"> |
499 | - <property name="visible">True</property> |
500 | - <property name="xscale">0</property> |
501 | - <property name="yscale">0</property> |
502 | - <child> |
503 | - <object class="GtkHBox" id="hbox80"> |
504 | - <property name="visible">True</property> |
505 | - <property name="spacing">2</property> |
506 | - <child> |
507 | - <object class="GtkImage" id="image11"> |
508 | - <property name="visible">True</property> |
509 | - <property name="stock">gtk-go-up</property> |
510 | - </object> |
511 | - <packing> |
512 | - <property name="expand">False</property> |
513 | - <property name="fill">False</property> |
514 | - <property name="position">0</property> |
515 | - </packing> |
516 | - </child> |
517 | - <child> |
518 | - <object class="GtkLabel" id="label163"> |
519 | - <property name="visible">True</property> |
520 | - <property name="label" translatable="yes">Move _Up</property> |
521 | - <property name="use_underline">True</property> |
522 | - </object> |
523 | - <packing> |
524 | - <property name="expand">False</property> |
525 | - <property name="fill">False</property> |
526 | - <property name="position">1</property> |
527 | - </packing> |
528 | - </child> |
529 | - </object> |
530 | - </child> |
531 | - </object> |
532 | - </child> |
533 | + <property name="use_action_appearance">False</property> |
534 | + <property name="image">move_up_image</property> |
535 | + <property name="use_underline">True</property> |
536 | + <signal name="clicked" handler="on_button_column_up_clicked" swapped="no"/> |
537 | </object> |
538 | <packing> |
539 | <property name="expand">False</property> |
540 | @@ -567,46 +546,15 @@ |
541 | </child> |
542 | <child> |
543 | <object class="GtkButton" id="button_column_down"> |
544 | + <property name="label" translatable="yes">Move D_own</property> |
545 | + <property name="use_action_appearance">False</property> |
546 | <property name="visible">True</property> |
547 | <property name="can_focus">True</property> |
548 | <property name="receives_default">False</property> |
549 | - <signal name="clicked" handler="on_button_column_down_clicked"/> |
550 | - <child> |
551 | - <object class="GtkAlignment" id="alignment5"> |
552 | - <property name="visible">True</property> |
553 | - <property name="xscale">0</property> |
554 | - <property name="yscale">0</property> |
555 | - <child> |
556 | - <object class="GtkHBox" id="hbox81"> |
557 | - <property name="visible">True</property> |
558 | - <property name="spacing">2</property> |
559 | - <child> |
560 | - <object class="GtkImage" id="image12"> |
561 | - <property name="visible">True</property> |
562 | - <property name="stock">gtk-go-down</property> |
563 | - </object> |
564 | - <packing> |
565 | - <property name="expand">False</property> |
566 | - <property name="fill">False</property> |
567 | - <property name="position">0</property> |
568 | - </packing> |
569 | - </child> |
570 | - <child> |
571 | - <object class="GtkLabel" id="label164"> |
572 | - <property name="visible">True</property> |
573 | - <property name="label" translatable="yes">Move D_own</property> |
574 | - <property name="use_underline">True</property> |
575 | - </object> |
576 | - <packing> |
577 | - <property name="expand">False</property> |
578 | - <property name="fill">False</property> |
579 | - <property name="position">1</property> |
580 | - </packing> |
581 | - </child> |
582 | - </object> |
583 | - </child> |
584 | - </object> |
585 | - </child> |
586 | + <property name="use_action_appearance">False</property> |
587 | + <property name="image">move_down_image</property> |
588 | + <property name="use_underline">True</property> |
589 | + <signal name="clicked" handler="on_button_column_down_clicked" swapped="no"/> |
590 | </object> |
591 | <packing> |
592 | <property name="expand">False</property> |
593 | |
594 | === modified file 'gtk/gtkbuilder/window_rgdebinstall_progress.ui' |
595 | --- gtk/gtkbuilder/window_rgdebinstall_progress.ui 2010-10-06 15:22:41 +0000 |
596 | +++ gtk/gtkbuilder/window_rgdebinstall_progress.ui 2012-04-10 17:44:21 +0000 |
597 | @@ -9,7 +9,6 @@ |
598 | <property name="modal">True</property> |
599 | <property name="resizable">False</property> |
600 | <property name="destroy_with_parent">False</property> |
601 | - <property name="icon">synaptic_mini.xpm</property> |
602 | <property name="decorated">True</property> |
603 | <property name="skip_taskbar_hint">False</property> |
604 | <property name="skip_pager_hint">False</property> |
605 | |
606 | === modified file 'gtk/gtkbuilder/window_rginstall_progress.ui' |
607 | --- gtk/gtkbuilder/window_rginstall_progress.ui 2010-10-06 15:22:41 +0000 |
608 | +++ gtk/gtkbuilder/window_rginstall_progress.ui 2012-04-10 17:44:21 +0000 |
609 | @@ -10,7 +10,6 @@ |
610 | <property name="modal">True</property> |
611 | <property name="resizable">False</property> |
612 | <property name="destroy_with_parent">False</property> |
613 | - <property name="icon">synaptic_mini.xpm</property> |
614 | <child> |
615 | <object class="GtkVBox" id="vbox11"> |
616 | <property name="visible">True</property> |
617 | |
618 | === modified file 'gtk/gtkbuilder/window_setopt.ui' |
619 | --- gtk/gtkbuilder/window_setopt.ui 2010-10-07 18:13:47 +0000 |
620 | +++ gtk/gtkbuilder/window_setopt.ui 2012-04-10 17:44:21 +0000 |
621 | @@ -12,7 +12,6 @@ |
622 | <property name="default_height">140</property> |
623 | <property name="resizable">False</property> |
624 | <property name="destroy_with_parent">False</property> |
625 | - <property name="icon">synaptic_mini.xpm</property> |
626 | <property name="decorated">True</property> |
627 | <property name="skip_taskbar_hint">False</property> |
628 | <property name="skip_pager_hint">False</property> |
629 | |
630 | === modified file 'gtk/gtkbuilder/window_summary.ui' |
631 | --- gtk/gtkbuilder/window_summary.ui 2010-10-06 15:22:41 +0000 |
632 | +++ gtk/gtkbuilder/window_summary.ui 2012-04-10 17:44:21 +0000 |
633 | @@ -9,7 +9,6 @@ |
634 | <property name="modal">True</property> |
635 | <property name="resizable">True</property> |
636 | <property name="destroy_with_parent">False</property> |
637 | - <property name="icon">synaptic_mini.xpm</property> |
638 | <property name="decorated">True</property> |
639 | <property name="skip_taskbar_hint">True</property> |
640 | <property name="skip_pager_hint">False</property> |
641 | @@ -46,6 +45,7 @@ |
642 | <property name="tooltip-text" translatable="yes">Apply all marked changes</property> |
643 | <property name="can_default">True</property> |
644 | <property name="has_default">True</property> |
645 | + <property name="has_focus">True</property> |
646 | <property name="can_focus">True</property> |
647 | <property name="label">gtk-apply</property> |
648 | <property name="use_stock">True</property> |
649 | @@ -181,7 +181,7 @@ |
650 | <property name="headers_visible">False</property> |
651 | <property name="rules_hint">False</property> |
652 | <property name="reorderable">False</property> |
653 | - <property name="enable_search">True</property> |
654 | + <property name="enable_search">False</property> |
655 | <property name="fixed_height_mode">False</property> |
656 | <property name="hover_selection">False</property> |
657 | <property name="hover_expand">False</property> |
658 | |
659 | === modified file 'gtk/gtkbuilder/window_tasks.ui' |
660 | --- gtk/gtkbuilder/window_tasks.ui 2010-10-06 15:22:41 +0000 |
661 | +++ gtk/gtkbuilder/window_tasks.ui 2012-04-10 17:44:21 +0000 |
662 | @@ -12,7 +12,6 @@ |
663 | <property name="default_height">400</property> |
664 | <property name="resizable">True</property> |
665 | <property name="destroy_with_parent">False</property> |
666 | - <property name="icon">synaptic_mini.xpm</property> |
667 | <child> |
668 | <object class="GtkVBox" id="vbox1"> |
669 | <property name="visible">True</property> |
670 | |
671 | === modified file 'gtk/gtkbuilder/window_zvtinstallprogress.ui' |
672 | --- gtk/gtkbuilder/window_zvtinstallprogress.ui 2010-10-06 15:22:41 +0000 |
673 | +++ gtk/gtkbuilder/window_zvtinstallprogress.ui 2012-04-10 17:44:21 +0000 |
674 | @@ -9,7 +9,6 @@ |
675 | <property name="modal">False</property> |
676 | <property name="resizable">True</property> |
677 | <property name="destroy_with_parent">False</property> |
678 | - <property name="icon">synaptic_mini.xpm</property> |
679 | <property name="decorated">True</property> |
680 | <property name="skip_taskbar_hint">False</property> |
681 | <property name="skip_pager_hint">False</property> |
682 | |
683 | === modified file 'gtk/rgdebinstallprogress.cc' |
684 | --- gtk/rgdebinstallprogress.cc 2010-12-07 14:48:38 +0000 |
685 | +++ gtk/rgdebinstallprogress.cc 2012-04-10 17:44:21 +0000 |
686 | @@ -669,7 +669,7 @@ |
687 | return res; |
688 | |
689 | // we need to send the fds from the pipe over a socket because |
690 | - // §""!%&§/ vte_terminal closes all our FDs |
691 | + // the vte_terminal closes all our FDs |
692 | _child_id = vte_terminal_forkpty(VTE_TERMINAL(_term),NULL,NULL, |
693 | false,false,false); |
694 | if (_child_id < 0) { |
695 | @@ -773,8 +773,8 @@ |
696 | GtkWidget *img = GTK_WIDGET(gtk_builder_get_object(_builder, "image_finished")); |
697 | switch(res) { |
698 | case 0: // success |
699 | - gtk_image_set_from_file(GTK_IMAGE(img), |
700 | - PACKAGE_DATA_DIR"/pixmaps/synaptic.png"); |
701 | + gtk_image_set_from_icon_name(GTK_IMAGE(img), |
702 | + "synaptic", GTK_ICON_SIZE_DIALOG); |
703 | break; |
704 | case 1: // error |
705 | gtk_image_set_from_stock(GTK_IMAGE(img), GTK_STOCK_DIALOG_ERROR, |
706 | |
707 | === modified file 'gtk/rgfiltermanager.cc' |
708 | --- gtk/rgfiltermanager.cc 2011-02-10 08:35:34 +0000 |
709 | +++ gtk/rgfiltermanager.cc 2012-04-10 17:44:21 +0000 |
710 | @@ -96,7 +96,7 @@ |
711 | "clicked", |
712 | G_CALLBACK(addFilterAction), this); |
713 | |
714 | - g_signal_connect(gtk_builder_get_object(_builder, "buttons_filters_remove"), |
715 | + g_signal_connect(gtk_builder_get_object(_builder, "button_filters_remove"), |
716 | "clicked", |
717 | G_CALLBACK(removeFilterAction), this); |
718 | |
719 | |
720 | === modified file 'gtk/rggtkbuilderwindow.cc' |
721 | --- gtk/rggtkbuilderwindow.cc 2010-11-12 18:58:47 +0000 |
722 | +++ gtk/rggtkbuilderwindow.cc 2012-04-10 17:44:21 +0000 |
723 | @@ -71,6 +71,8 @@ |
724 | |
725 | gtk_window_set_position(GTK_WINDOW(_win), |
726 | GTK_WIN_POS_CENTER_ON_PARENT); |
727 | + GdkPixbuf *icon = get_gdk_pixbuf( "synaptic" ); |
728 | + gtk_window_set_icon(GTK_WINDOW(_win), icon); |
729 | |
730 | g_free(filename); |
731 | g_free(local_filename); |
732 | @@ -117,6 +119,22 @@ |
733 | return true; |
734 | } |
735 | |
736 | +bool RGGtkBuilderWindow::setMarkup(const char *widget_name, const char *value) |
737 | +{ |
738 | + GtkWidget *widget = GTK_WIDGET (gtk_builder_get_object (_builder, widget_name)); |
739 | + if (widget == NULL) { |
740 | + cout << "widget == NULL with: " << widget_name << endl; |
741 | + return false; |
742 | + } |
743 | + |
744 | + const gchar *utf8value=utf8(value); |
745 | + |
746 | + if (!utf8value) |
747 | + utf8value = _("N/A"); |
748 | + gtk_label_set_markup(GTK_LABEL(widget), utf8value); |
749 | + return true; |
750 | +} |
751 | + |
752 | bool RGGtkBuilderWindow::setLabel(const char *widget_name, const long value) |
753 | { |
754 | string strVal; |
755 | |
756 | === modified file 'gtk/rggtkbuilderwindow.h' |
757 | --- gtk/rggtkbuilderwindow.h 2010-10-06 21:07:41 +0000 |
758 | +++ gtk/rggtkbuilderwindow.h 2012-04-10 17:44:21 +0000 |
759 | @@ -53,6 +53,7 @@ |
760 | |
761 | // functions to set various widgets |
762 | bool setLabel(const char *name, const char *value); |
763 | + bool setMarkup(const char *widget_name, const char *value); |
764 | bool setLabel(const char *name, const long value); |
765 | bool setTextView(const char *widget_name, const char *value, |
766 | bool useHeadline=false); |
767 | |
768 | === modified file 'gtk/rgmainwindow.cc' |
769 | --- gtk/rgmainwindow.cc 2012-03-02 09:41:07 +0000 |
770 | +++ gtk/rgmainwindow.cc 2012-04-10 17:44:21 +0000 |
771 | @@ -77,9 +77,6 @@ |
772 | #include "rgutils.h" |
773 | #include "sections_trans.h" |
774 | |
775 | -// icons and pixmaps |
776 | -#include "synaptic.xpm" |
777 | - |
778 | #include "i18n.h" |
779 | |
780 | // include it here because depcache.h hates us if we have it before |
781 | @@ -491,8 +488,7 @@ |
782 | RGMainWindow *me = (RGMainWindow *) data; |
783 | if (me->_blockActions) |
784 | return; |
785 | - cout << "RGMainWindow::cbMenuAutoInstalledClickedn()" << endl; |
786 | - |
787 | + |
788 | bool active = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(self)); |
789 | |
790 | GtkTreeSelection *selection; |
791 | @@ -1200,9 +1196,7 @@ |
792 | // here is a pointer to rgmainwindow for every widget that needs it |
793 | g_object_set_data(G_OBJECT(_win), "me", this); |
794 | |
795 | - |
796 | - GdkPixbuf *icon = gdk_pixbuf_new_from_xpm_data((const char **) |
797 | - synaptic_xpm); |
798 | + GdkPixbuf *icon = get_gdk_pixbuf( "synaptic" ); |
799 | gtk_window_set_icon(GTK_WINDOW(_win), icon); |
800 | |
801 | gtk_window_resize(GTK_WINDOW(_win), |
802 | @@ -1890,10 +1884,13 @@ |
803 | void RGMainWindow::pkgRemoveHelper(RPackage *pkg, bool purge, bool withDeps) |
804 | { |
805 | if (pkg->getFlags() & RPackage::FImportant) { |
806 | - if (!_userDialog->confirm(_("Removing this package may render the " |
807 | - "system unusable.\n" |
808 | - "Are you sure you want to do that?"), |
809 | - false)) { |
810 | + gchar* warning = g_strdup_printf(_( "Removing package \"%s\" may render the " |
811 | + "system unusable.\n" |
812 | + "Are you sure you want to do that?"), |
813 | + pkg->name()); |
814 | + bool confirmed = _userDialog->confirm(warning, false); |
815 | + g_free(warning); |
816 | + if (!confirmed) { |
817 | return; |
818 | } |
819 | } |
820 | @@ -2398,7 +2395,7 @@ |
821 | if(me->_pkgDetails == NULL) |
822 | me->_pkgDetails = new RGPkgDetailsWindow(me); |
823 | |
824 | - RGPkgDetailsWindow::fillInValues(me->_pkgDetails, pkg); |
825 | + RGPkgDetailsWindow::fillInValues(me->_pkgDetails, pkg, true); |
826 | me->_pkgDetails->show(); |
827 | } |
828 | |
829 | @@ -2465,7 +2462,7 @@ |
830 | dialog = gtk_message_dialog_new (GTK_WINDOW(me->window()), |
831 | GTK_DIALOG_DESTROY_WITH_PARENT, |
832 | GTK_MESSAGE_INFO, |
833 | - GTK_BUTTONS_CLOSE, |
834 | + GTK_BUTTONS_NONE, |
835 | _("Repositories changed")); |
836 | // TRANSLATORS: this message appears when the user added/removed |
837 | // a repository (sources.list entry) a reload (apt-get update) is |
838 | @@ -2481,13 +2478,21 @@ |
839 | #else |
840 | gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dialog), msgstr); |
841 | #endif |
842 | + gtk_dialog_add_buttons(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, _("_Reload"), GTK_RESPONSE_ACCEPT, NULL); |
843 | + GtkWidget* reload_button = gtk_dialog_get_widget_for_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT); |
844 | + GtkWidget* refresh_image = gtk_image_new_from_stock(GTK_STOCK_REFRESH, GTK_ICON_SIZE_BUTTON); |
845 | + gtk_button_set_image(GTK_BUTTON(reload_button), refresh_image); |
846 | cb = gtk_check_button_new_with_label(_("Never show this message again")); |
847 | gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(dialog)->vbox),cb); |
848 | gtk_widget_show(cb); |
849 | - gtk_dialog_run (GTK_DIALOG (dialog)); |
850 | + gint response = gtk_dialog_run (GTK_DIALOG (dialog)); |
851 | + gtk_widget_hide(dialog); |
852 | if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb))) { |
853 | _config->Set("Synaptic::AskForUpdateAfterSrcChange", false); |
854 | } |
855 | + if (response == GTK_RESPONSE_ACCEPT) { |
856 | + me->cbUpdateClicked(NULL, data); |
857 | + } |
858 | gtk_widget_destroy (dialog); |
859 | } |
860 | } |
861 | @@ -2593,41 +2598,27 @@ |
862 | |
863 | me->setStatusText(_("Starting help viewer...")); |
864 | |
865 | - string cmd; |
866 | - if (is_binary_in_path("yelp")) |
867 | - cmd = "yelp ghelp:synaptic"; |
868 | -#if 0 // FIXME: khelpcenter can't display this? check again! |
869 | - else if(is_binary_in_path("khelpcenter")) { |
870 | - system("konqueror ghelp:///" PACKAGE_DATA_DIR "/gnome/help/synaptic/C/synaptic.xml &"); |
871 | - } |
872 | -#endif |
873 | - else if (is_binary_in_path("mozilla")) { |
874 | - cmd = "mozilla " PACKAGE_DATA_DIR "/synaptic/html/index.html"; |
875 | - } else if (is_binary_in_path("konqueror")) { |
876 | - cmd = "konqueror " PACKAGE_DATA_DIR "/synaptic/html/index.html"; |
877 | + // FIXME: move this into rgutils as well (or rgspawn.cc) |
878 | + vector<const gchar*> cmd; |
879 | + if (is_binary_in_path("yelp")) { |
880 | + cmd.push_back("yelp"); |
881 | + cmd.push_back("ghelp:synaptic"); |
882 | } else { |
883 | + cmd = GetBrowserCommand(PACKAGE_DATA_DIR "/synaptic/html/index.html"); |
884 | + } |
885 | + |
886 | + if (cmd.empty()) { |
887 | me->_userDialog->error(_("No help viewer is installed!\n\n" |
888 | "You need either the GNOME help viewer 'yelp', " |
889 | - "the 'konqueror' browser or the 'mozilla' " |
890 | + "the 'konqueror' browser or the 'firefox' " |
891 | "browser to view the synaptic manual.\n\n" |
892 | "Alternatively you can open the man page " |
893 | "with 'man synaptic' from the " |
894 | "command line or view the html version located " |
895 | "in the 'synaptic/html' folder.")); |
896 | - } |
897 | - |
898 | - if (!cmd.empty()) { |
899 | - gchar * sudo_user; |
900 | - sudo_user = g_strdup(getenv("SUDO_USER")); |
901 | - // if gksu is not found or SUDO_USER is not set, run the help viewer anyway |
902 | - if(is_binary_in_path("sudo") && (sudo_user != NULL)) |
903 | - cmd = "sudo -u " + string(sudo_user) + " " + cmd; |
904 | - g_free(sudo_user); |
905 | - cmd += " &"; |
906 | - if(system(cmd.c_str()) < 0) { |
907 | - g_warning(_("An error occured while starting the help viewer\n\tCommand: %s"), cmd.c_str()); |
908 | - } |
909 | - } |
910 | + return; |
911 | + } |
912 | + RunAsSudoUserCommand(cmd); |
913 | } |
914 | |
915 | void RGMainWindow::cbCloseFilterManagerAction(void *self, bool okcancel) |
916 | @@ -2763,8 +2754,6 @@ |
917 | |
918 | void RGMainWindow::cbPkgReconfigureClicked(GtkWidget *self, void *data) |
919 | { |
920 | - char frontend[] = "gnome"; |
921 | - char *cmd; |
922 | RGMainWindow *me = (RGMainWindow *) data; |
923 | //cout << "RGMainWindow::pkgReconfigureClicked()" << endl; |
924 | |
925 | @@ -2781,9 +2770,15 @@ |
926 | } |
927 | |
928 | me->setStatusText(_("Starting package configuration tool...")); |
929 | - cmd = g_strdup_printf("/usr/sbin/dpkg-reconfigure -f%s %s &", |
930 | - frontend, me->selectedPackage()->name()); |
931 | - system(cmd); |
932 | + const gchar *cmd[] = { "/usr/sbin/dpkg-reconfigure", |
933 | + "-fgnome", |
934 | + me->selectedPackage()->name(), |
935 | + NULL }; |
936 | + GError *error = NULL; |
937 | + g_spawn_async("/", (gchar**)cmd, NULL, (GSpawnFlags)0, NULL, NULL, NULL, &error); |
938 | + if(error != NULL) { |
939 | + std::cerr << "failed to run dpkg-reconfigure cmd" << std::endl; |
940 | + } |
941 | } |
942 | |
943 | |
944 | |
945 | === modified file 'gtk/rgpackagestatus.cc' |
946 | --- gtk/rgpackagestatus.cc 2010-07-29 12:14:32 +0000 |
947 | +++ gtk/rgpackagestatus.cc 2012-04-10 17:44:21 +0000 |
948 | @@ -29,33 +29,6 @@ |
949 | #include "rgutils.h" |
950 | #include "rgpackagestatus.h" |
951 | |
952 | -// helper |
953 | -static GdkPixbuf * |
954 | -get_gdk_pixbuf(const gchar *name, int size=16) |
955 | -{ |
956 | - GtkIconTheme *theme; |
957 | - GdkPixbuf *pixbuf; |
958 | - GError *error = NULL; |
959 | - |
960 | - theme = gtk_icon_theme_get_default(); |
961 | - pixbuf = gtk_icon_theme_load_icon(theme, name, size, |
962 | - (GtkIconLookupFlags)0, &error); |
963 | - if (pixbuf == NULL) |
964 | - std::cerr << "Warning, failed to load: " << name |
965 | - << error->message << std::endl; |
966 | - |
967 | - return pixbuf; |
968 | -} |
969 | - |
970 | -GtkWidget *get_gtk_image(const gchar *name, int size) |
971 | -{ |
972 | - GdkPixbuf *buf; |
973 | - buf = get_gdk_pixbuf(name, size); |
974 | - if(!buf) |
975 | - return NULL; |
976 | - return gtk_image_new_from_pixbuf(buf); |
977 | -} |
978 | - |
979 | // RPackageStatus stuff |
980 | RGPackageStatus RGPackageStatus::pkgStatus; |
981 | |
982 | |
983 | === modified file 'gtk/rgpkgdetails.cc' |
984 | --- gtk/rgpkgdetails.cc 2012-02-08 20:39:44 +0000 |
985 | +++ gtk/rgpkgdetails.cc 2012-04-10 17:44:21 +0000 |
986 | @@ -181,6 +181,16 @@ |
987 | ShowChangelogDialog(parent, pkg); |
988 | } |
989 | |
990 | +gboolean RGPkgDetailsWindow::cbOpenHomepage(GtkWidget *button, void* data) |
991 | +{ |
992 | + RPackage *pkg = (RPackage*)data; |
993 | + std::vector<const gchar*> cmd = GetBrowserCommand(pkg->homepage()); |
994 | + std::cerr << "cbOpenHomepage: " << cmd[0] << std::endl; |
995 | + RunAsSudoUserCommand(cmd); |
996 | + |
997 | + return TRUE; |
998 | +} |
999 | + |
1000 | void RGPkgDetailsWindow::fillInValues(RGGtkBuilderWindow *me, |
1001 | RPackage *pkg, |
1002 | bool setTitle) |
1003 | @@ -200,7 +210,17 @@ |
1004 | me->setTextView("textview_pkgcommon", pkg_summary, true); |
1005 | g_free(pkg_summary); |
1006 | |
1007 | - me->setLabel("label_maintainer", pkg->maintainer()); |
1008 | + string maintainer = pkg->maintainer(); |
1009 | + int start_index = maintainer.find("<"); |
1010 | + int end_index = maintainer.rfind(">"); |
1011 | + if (start_index != -1 && end_index != -1) { |
1012 | + gchar* maintainer_label = g_markup_printf_escaped("<a href=\"mailto:%s\">%s</a>", maintainer.substr(start_index+1, end_index - start_index - 1).c_str(), maintainer.c_str() ); |
1013 | + me->setMarkup("label_maintainer", maintainer_label); |
1014 | + g_free(maintainer_label); |
1015 | + } else { |
1016 | + me->setLabel("label_maintainer", pkg->maintainer()); |
1017 | + } |
1018 | + |
1019 | me->setPixmap("image_state", RGPackageStatus::pkgStatus.getPixbuf(pkg)); |
1020 | me->setLabel("label_state", RGPackageStatus::pkgStatus.getLongStatusString(pkg)); |
1021 | me->setLabel("label_priority", pkg->priority()); |
1022 | @@ -288,6 +308,23 @@ |
1023 | gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(textview), button, anchor); |
1024 | gtk_widget_show(button); |
1025 | |
1026 | + // add button to open the homepage |
1027 | + if (strlen(pkg->homepage())) { |
1028 | + gtk_text_buffer_insert(buf, &it, " ", 1); |
1029 | + anchor = gtk_text_buffer_create_child_anchor(buf, &it); |
1030 | + button = gtk_link_button_new_with_label("", _("Visit Homepage")); |
1031 | + char *homepage_tooltip = g_strdup_printf("Visit %s", |
1032 | + pkg->homepage()); |
1033 | + g_signal_connect(G_OBJECT(button),"clicked", |
1034 | + G_CALLBACK(cbOpenHomepage), |
1035 | + pkg); |
1036 | + gtk_widget_set_tooltip_text(button, homepage_tooltip); |
1037 | + g_free(homepage_tooltip); |
1038 | + g_object_set_data(G_OBJECT(button), "me", me); |
1039 | + gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(textview), button, anchor); |
1040 | + gtk_widget_show(button); |
1041 | + } |
1042 | + |
1043 | // show the rest of the description |
1044 | gtk_text_buffer_insert(buf, &it, "\n", 1); |
1045 | s = utf8(pkg->description()); |
1046 | |
1047 | === modified file 'gtk/rgpkgdetails.h' |
1048 | --- gtk/rgpkgdetails.h 2012-02-08 20:39:44 +0000 |
1049 | +++ gtk/rgpkgdetails.h 2012-04-10 17:44:21 +0000 |
1050 | @@ -45,6 +45,7 @@ |
1051 | static void cbShowScreenshot(GtkWidget *button, void *data); |
1052 | static void cbShowBigScreenshot(GtkWidget *button, GdkEventButton *event, void *data); |
1053 | static void cbShowChangelog(GtkWidget *button, void *data); |
1054 | + static gboolean cbOpenHomepage(GtkWidget *button, void *data); |
1055 | static void doShowBigScreenshot(RPackage *pkg); |
1056 | |
1057 | public: |
1058 | |
1059 | === modified file 'gtk/rgpreferenceswindow.cc' |
1060 | --- gtk/rgpreferenceswindow.cc 2010-11-16 15:59:34 +0000 |
1061 | +++ gtk/rgpreferenceswindow.cc 2012-04-10 17:44:21 +0000 |
1062 | @@ -48,8 +48,8 @@ |
1063 | |
1064 | const char *RGPreferencesWindow::column_visible_names[] = |
1065 | {_("Status"), _("Supported"), _("Package Name"), _("Section"), |
1066 | - _("Component"), _("Installed Version"), _("Available Version"), |
1067 | - _("Installed Size"), _("Download Size"),_("Description"), NULL }; |
1068 | + _("Component"), _("Installed Version"), _("Latest Version"), |
1069 | + _("Size"), _("Download Size"),_("Description"), NULL }; |
1070 | |
1071 | const gboolean RGPreferencesWindow::column_visible_defaults[] = |
1072 | { TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE }; |
1073 | @@ -650,8 +650,8 @@ |
1074 | // proxy stuff |
1075 | bool useProxy = _config->FindB("Synaptic::useProxy", false); |
1076 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object |
1077 | - (_builder,"radio_use_proxy")), |
1078 | - useProxy); |
1079 | + (_builder,"radio_no_proxy")), |
1080 | + !useProxy); |
1081 | gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object |
1082 | (_builder, "table_proxy")), |
1083 | useProxy); |
1084 | |
1085 | === modified file 'gtk/rgsummarywindow.cc' |
1086 | --- gtk/rgsummarywindow.cc 2010-10-07 19:51:48 +0000 |
1087 | +++ gtk/rgsummarywindow.cc 2012-04-10 17:44:21 +0000 |
1088 | @@ -393,6 +393,7 @@ |
1089 | toDowngrade, unAuthenticated,sizeChange); |
1090 | lister->getDownloadSummary(dlCount, dlSize); |
1091 | |
1092 | + gtk_widget_set_visible(_dlonlyB, (dlSize > 0)); |
1093 | #if 0 |
1094 | if (held) { |
1095 | char *str = ngettext("%d package is locked\n", |
1096 | |
1097 | === modified file 'gtk/rguserdialog.cc' |
1098 | --- gtk/rguserdialog.cc 2010-11-12 17:46:13 +0000 |
1099 | +++ gtk/rguserdialog.cc 2012-04-10 17:44:21 +0000 |
1100 | @@ -76,6 +76,9 @@ |
1101 | _("An error occurred"), |
1102 | _("The following details " |
1103 | "are provided:"))); |
1104 | + GdkPixbuf *icon = get_gdk_pixbuf( "synaptic" ); |
1105 | + gtk_window_set_icon(GTK_WINDOW(dia), icon); |
1106 | + |
1107 | gtk_widget_set_size_request(dia, 500, 300); |
1108 | gtk_window_set_resizable(GTK_WINDOW(dia), TRUE); |
1109 | gtk_container_set_border_width(GTK_CONTAINER(dia), 6); |
1110 | @@ -160,7 +163,9 @@ |
1111 | GTK_DIALOG_DESTROY_WITH_PARENT, |
1112 | gtkmessage, gtkbuttons, "%s", |
1113 | NULL); |
1114 | - |
1115 | + GdkPixbuf *icon = get_gdk_pixbuf( "synaptic" ); |
1116 | + gtk_window_set_icon(GTK_WINDOW(dia), icon); |
1117 | + |
1118 | gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG(dia), utf8(msg)); |
1119 | gtk_container_set_border_width(GTK_CONTAINER(dia), 6); |
1120 | |
1121 | @@ -237,6 +242,8 @@ |
1122 | } |
1123 | _dialog = GTK_WIDGET(gtk_builder_get_object(builder, main_widget)); |
1124 | assert(_dialog); |
1125 | + GdkPixbuf *icon = get_gdk_pixbuf( "synaptic" ); |
1126 | + gtk_window_set_icon(GTK_WINDOW(_dialog), icon); |
1127 | |
1128 | gtk_window_set_position(GTK_WINDOW(_dialog), |
1129 | GTK_WIN_POS_CENTER_ON_PARENT); |
1130 | |
1131 | === modified file 'gtk/rgutils.cc' |
1132 | --- gtk/rgutils.cc 2012-01-05 19:44:16 +0000 |
1133 | +++ gtk/rgutils.cc 2012-04-10 17:44:21 +0000 |
1134 | @@ -34,6 +34,33 @@ |
1135 | #include "rgutils.h" |
1136 | |
1137 | |
1138 | +// helper |
1139 | +GdkPixbuf * |
1140 | +get_gdk_pixbuf(const gchar *name, int size) |
1141 | +{ |
1142 | + GtkIconTheme *theme; |
1143 | + GdkPixbuf *pixbuf; |
1144 | + GError *error = NULL; |
1145 | + |
1146 | + theme = gtk_icon_theme_get_default(); |
1147 | + pixbuf = gtk_icon_theme_load_icon(theme, name, size, |
1148 | + (GtkIconLookupFlags)0, &error); |
1149 | + if (pixbuf == NULL) |
1150 | + std::cerr << "Warning, failed to load: " << name |
1151 | + << error->message << std::endl; |
1152 | + |
1153 | + return pixbuf; |
1154 | +} |
1155 | + |
1156 | +GtkWidget *get_gtk_image(const gchar *name, int size) |
1157 | +{ |
1158 | + GdkPixbuf *buf; |
1159 | + buf = get_gdk_pixbuf(name, size); |
1160 | + if(!buf) |
1161 | + return NULL; |
1162 | + return gtk_image_new_from_pixbuf(buf); |
1163 | +} |
1164 | + |
1165 | void RGFlushInterface() |
1166 | { |
1167 | XSync(GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), False); |
1168 | @@ -84,6 +111,76 @@ |
1169 | return S; |
1170 | } |
1171 | |
1172 | +std::vector<const gchar*> GetBrowserCommand(const gchar *link) |
1173 | +{ |
1174 | + std::vector<const gchar*> cmd; |
1175 | + if (FileExists("/usr/bin/xdg-open")) { |
1176 | + cmd.push_back("/usr/bin/xdg-open"); |
1177 | + cmd.push_back(link); |
1178 | + } else if (FileExists("/usr/bin/firefox")) { |
1179 | + cmd.push_back("/usr/bin/firefox"); |
1180 | + cmd.push_back(link); |
1181 | + } else if (FileExists("/usr/bin/konqueror")) { |
1182 | + cmd.push_back("/usr/bin/konqueror"); |
1183 | + cmd.push_back(link); |
1184 | + } |
1185 | + return cmd; |
1186 | +} |
1187 | + |
1188 | +bool RunAsSudoUserCommand(std::vector<const gchar*> cmd) |
1189 | +{ |
1190 | + std::vector<const gchar*> prefix; |
1191 | + gchar *sudo_user; |
1192 | + |
1193 | + if (cmd.empty()) { |
1194 | + std::cerr << "Empty command for RunAsSudoUserCommand" << std::endl; |
1195 | + return true; |
1196 | + } |
1197 | + |
1198 | + // try pkexec first, then sudo |
1199 | + sudo_user = getenv("PKEXEC_UID"); |
1200 | + if (sudo_user == NULL) { |
1201 | + sudo_user = getenv("SUDO_USER"); |
1202 | + } |
1203 | +#if 0 // does not work for some reason |
1204 | + if(FileExists("/usr/bin/pkexec") && sudo_user != NULL) |
1205 | + { |
1206 | + prefix.push_back("/usr/bin/pkexec"); |
1207 | + prefix.push_back("--user"); |
1208 | + prefix.push_back(sudo_user); |
1209 | + } |
1210 | +#endif |
1211 | + if(FileExists("/usr/bin/sudo") && sudo_user != NULL) |
1212 | + { |
1213 | + prefix.push_back("/usr/bin/sudo"); |
1214 | + prefix.push_back("-u"); |
1215 | + prefix.push_back(sudo_user); |
1216 | + } |
1217 | + // insert the prefix string |
1218 | + cmd.insert(cmd.begin(), prefix.begin(), prefix.end()); |
1219 | + |
1220 | + for(std::vector<const gchar*>::iterator it = cmd.begin(); |
1221 | + it != cmd.end(); it++) |
1222 | + printf("cmd '%s'\n", *it); |
1223 | + |
1224 | + // build the c stract to make g_spawn_async happy |
1225 | + char **c_cmd = new char*[cmd.size()+1]; |
1226 | + int i; |
1227 | + for(i=0; i<cmd.size(); i++) |
1228 | + c_cmd[i] = (gchar*)cmd[i]; |
1229 | + c_cmd[i] = NULL; |
1230 | + |
1231 | + GError *error = NULL; |
1232 | + g_spawn_async("/", c_cmd, NULL, (GSpawnFlags)0, NULL, NULL, NULL, &error); |
1233 | + if (error != NULL) { |
1234 | + std::cerr << "Failed to run cmd: " << cmd[0] << std::endl; |
1235 | + } |
1236 | + |
1237 | + // and free the memory again |
1238 | + delete c_cmd; |
1239 | + |
1240 | + return true; |
1241 | +} |
1242 | |
1243 | bool is_binary_in_path(const char *program) |
1244 | { |
1245 | |
1246 | === modified file 'gtk/rgutils.h' |
1247 | --- gtk/rgutils.h 2012-01-05 19:44:16 +0000 |
1248 | +++ gtk/rgutils.h 2012-04-10 17:44:21 +0000 |
1249 | @@ -52,8 +52,11 @@ |
1250 | const char *utf8(const char *str); |
1251 | |
1252 | GtkWidget *get_gtk_image(const char *name, int size=16); |
1253 | +GdkPixbuf *get_gdk_pixbuf(const gchar *name, int size=16); |
1254 | |
1255 | std::string SizeToStr(double Bytes); |
1256 | +bool RunAsSudoUserCommand(std::vector<const gchar *> cmd); |
1257 | +std::vector<const gchar*> GetBrowserCommand(const gchar *link); |
1258 | |
1259 | std::string MarkupEscapeString(std::string str); |
1260 | std::string MarkupUnescapeString(std::string str); |
1261 | |
1262 | === modified file 'gtk/rgwindow.cc' |
1263 | --- gtk/rgwindow.cc 2004-02-07 21:13:29 +0000 |
1264 | +++ gtk/rgwindow.cc 2012-04-10 17:44:21 +0000 |
1265 | @@ -25,7 +25,7 @@ |
1266 | #include "config.h" |
1267 | #include "i18n.h" |
1268 | #include "rgwindow.h" |
1269 | - |
1270 | +#include "rgutils.h" |
1271 | |
1272 | bool RGWindow::windowCloseCallback(GtkWidget *window, GdkEvent * event) |
1273 | { |
1274 | @@ -40,6 +40,8 @@ |
1275 | //std::cout << "RGWindow::RGWindow(string name, bool makeBox)" << endl; |
1276 | _win = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
1277 | gtk_window_set_title(GTK_WINDOW(_win), (char *)name.c_str()); |
1278 | + GdkPixbuf *icon = get_gdk_pixbuf( "synaptic" ); |
1279 | + gtk_window_set_icon(GTK_WINDOW(_win), icon); |
1280 | |
1281 | gtk_object_set_data(GTK_OBJECT(_win), "me", this); |
1282 | gtk_signal_connect(GTK_OBJECT(_win), "delete-event", |
Thanks! Most of this is great, there is one small wishlist item I have:
The link buttons should point to a custom invoke browser method. The rational
is that we don't want to open browser windows as root. So the custom code need
to run something like "sudo -u $PKEXEC_UID xdg-open $link" (or if PKEXEC_UID is
not in the environment $SUDO_USER). There is code in rgmainwindow.cc that does
something like this currently (without the PKEXEC_UID bit). That should probably
move to rutils.{cc,h} and re-used for the link buttons as well. What do you think :) ?