Merge lp://staging/~awn-core/libdesktop-agnostic/various-fixes into lp://staging/libdesktop-agnostic

Proposed by Michal Hruby
Status: Merged
Merged at revision: 375
Proposed branch: lp://staging/~awn-core/libdesktop-agnostic/various-fixes
Merge into: lp://staging/libdesktop-agnostic
Diff against target: 79 lines
3 files modified
data/desktop-agnostic.xml (+3/-3)
libdesktop-agnostic/module.vala (+5/-4)
libdesktop-agnostic/ui-launcher-editor-dialog.vala (+5/-2)
To merge this branch: bzr merge lp://staging/~awn-core/libdesktop-agnostic/various-fixes
Reviewer Review Type Date Requested Status
Mark Lee Approve
Review via email: mp+12847@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Michal Hruby (mhr3) wrote :

Contains fixes for ColorButton and LauncherEditor.

363. By Mark Lee

Glade3: annotate which library needs to be loaded (thanks to mhr3).

364. By Mark Lee

GTK (ColorButton): fix notify property name (thanks to mhr3).

365. By Mark Lee

GTK (ColorButton): only disconnect the signal if it's still connected.

Revision history for this message
Michal Hruby (mhr3) wrote :

Added fix for module guessing with Vala 0.7.7

366. By Mark Lee

GTK (ColorButton): the destructor is not needed (according to mhr3).

367. By Mark Lee

Python (FDO): fix human-readable method names.

368. By Mark Lee

Config Notify Delegate: fix compile warning.

369. By Mark Lee

Config (KeyFile): don't set global-only options in an instance config object.

370. By Mark Lee

Module: allow the module directory environment variable to take precedence over the 'hardcoded' paths.

371. By Mark Lee

Config: when dealing with ValueArrays, use foreach instead of for.

372. By Mark Lee

Debian: remove obsolete sed commands.

373. By Mark Lee

GTK/UI: rename the gtk library/namespace to UI, so that using the widgets via GtkBuilder doesn't fail.

Revision history for this message
Mark Lee (malept) wrote :

> @@ -71,7 +75,9 @@
> private void
> on_clicked ()
> {
> + this._dialog.set_transient_for ((Window)this.get_toplevel ());
> this._dialog.show ();
> + this._dialog.run ();
> }
>
> private void

What is the purpose of this change? The commit message didn't really explain it.

review: Needs Information
Revision history for this message
Michal Hruby (mhr3) wrote :

> > @@ -71,7 +75,9 @@
> > private void
> > on_clicked ()
> > {
> > + this._dialog.set_transient_for ((Window)this.get_toplevel ());
> > this._dialog.show ();
> > + this._dialog.run ();
> > }
> >
> > private void
>
> What is the purpose of this change? The commit message didn't really explain
> it.

Runs the dialog modally instead of just showing it. The set_transient_for fixes various focus issues.

374. By Mark Lee

UI (Icon Button): Port the clicked signal handler of GtkColorButton, to fix modal/focus issues. (reported by mhr3).

Revision history for this message
Mark Lee (malept) wrote :

> > > @@ -71,7 +75,9 @@
> > > private void
> > > on_clicked ()
> > > {
> > > + this._dialog.set_transient_for ((Window)this.get_toplevel ());
> > > this._dialog.show ();
> > > + this._dialog.run ();
> > > }
> > >
> > > private void
> >
> > What is the purpose of this change? The commit message didn't really explain
> > it.
>
> Runs the dialog modally instead of just showing it. The set_transient_for
> fixes various focus issues.

Revision 374 should fix these issues. It ported the transient/modal code from GtkColorButton.

review: Needs Fixing
Revision history for this message
Michal Hruby (mhr3) wrote :

> > > > @@ -71,7 +75,9 @@
> > > > private void
> > > > on_clicked ()
> > > > {
> > > > + this._dialog.set_transient_for ((Window)this.get_toplevel ());
> > > > this._dialog.show ();
> > > > + this._dialog.run ();
> > > > }
> > > >
> > > > private void
> > >
> > > What is the purpose of this change? The commit message didn't really
> explain
> > > it.
> >
> > Runs the dialog modally instead of just showing it. The set_transient_for
> > fixes various focus issues.
>
> Revision 374 should fix these issues. It ported the transient/modal code from
> GtkColorButton.

Yea, it works fine, I merged the changes from trunk.

Revision history for this message
Mark Lee (malept) wrote :

The following are changes I made in the merge.

+ private static delegate Type GuessModuleFunction (ModuleLoader loader,

Please don't add superfluous whitespace. You should install the bzr-text-checker plugin:

https://launchpad.net/bzr-text-checker

> + unowned GuessModuleFunction guess_module_fn;

Got rid of the variable rename.

> + if (this._output.exists () && !this._output.is_writable ())

Not needed, and gives an unintended side effect. What if the output path is /root/foo and the user is not a superuser?

review: Approve
375. By Mark Lee

Merge from <lp:~mhr3/libdesktop-agnostic/various-fixes>, revision 369.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/desktop-agnostic.xml'
--- data/desktop-agnostic.xml 2009-10-04 17:38:10 +0000
+++ data/desktop-agnostic.xml 2009-10-22 12:36:12 +0000
@@ -1,13 +1,13 @@
1<?xml version="1.0"?>1<?xml version="1.0"?>
2<glade-catalog name="desktop-agnostic" library="desktop-agnostic-gtk"2<glade-catalog name="desktop-agnostic" library="desktop-agnostic-ui"
3 version="0.4" depends="gtk+">3 version="0.4" depends="gtk+">
4 <glade-widget-classes>4 <glade-widget-classes>
5 <!-- do not use @parent, it overrides @get-type -->5 <!-- do not use @parent, it overrides @get-type -->
6 <glade-widget-class name="DesktopAgnosticGTKColorButton"6 <glade-widget-class name="DesktopAgnosticUIColorButton"
7 icon-name="widget-gtk-colorbutton"7 icon-name="widget-gtk-colorbutton"
8 generic-name="colorbutton" title="Color Button"/>8 generic-name="colorbutton" title="Color Button"/>
9 </glade-widget-classes>9 </glade-widget-classes>
10 <glade-widget-group name="desktop-agnostic" title="Desktop Agnostic">10 <glade-widget-group name="desktop-agnostic" title="Desktop Agnostic">
11 <glade-widget-class-ref name="DesktopAgnosticGTKColorButton" />11 <glade-widget-class-ref name="DesktopAgnosticUIColorButton" />
12 </glade-widget-group>12 </glade-widget-group>
13</glade-catalog>13</glade-catalog>
1414
=== modified file 'libdesktop-agnostic/module.vala'
--- libdesktop-agnostic/module.vala 2009-10-21 18:42:23 +0000
+++ libdesktop-agnostic/module.vala 2009-10-22 12:36:12 +0000
@@ -60,7 +60,8 @@
60 modules = Datalist<Module> ();60 modules = Datalist<Module> ();
61 }61 }
6262
63 private delegate Type GuessModuleFunction (string library_prefix);63 private static delegate Type GuessModuleFunction (ModuleLoader loader,
64 string library_prefix);
64 private Module? module_guesser;65 private Module? module_guesser;
6566
66 private ModuleLoader ()67 private ModuleLoader ()
@@ -175,7 +176,7 @@
175 guess_module (string library_prefix)176 guess_module (string library_prefix)
176 {177 {
177 void* function;178 void* function;
178 GuessModuleFunction guess_module;179 unowned GuessModuleFunction guess_module_fn;
179180
180 if (this.module_guesser == null)181 if (this.module_guesser == null)
181 {182 {
@@ -203,8 +204,8 @@
203 assert (this.module_guesser != null);204 assert (this.module_guesser != null);
204205
205 this.module_guesser.symbol ("guess_module", out function);206 this.module_guesser.symbol ("guess_module", out function);
206 guess_module = (GuessModuleFunction)function;207 guess_module_fn = (GuessModuleFunction)function;
207 return guess_module (library_prefix);208 return guess_module_fn (this, library_prefix);
208 }209 }
209 }210 }
210 private static KeyFile module_config = null;211 private static KeyFile module_config = null;
211212
=== modified file 'libdesktop-agnostic/ui-launcher-editor-dialog.vala'
--- libdesktop-agnostic/ui-launcher-editor-dialog.vala 2009-10-21 22:09:04 +0000
+++ libdesktop-agnostic/ui-launcher-editor-dialog.vala 2009-10-22 12:36:12 +0000
@@ -277,8 +277,7 @@
277277
278 if (response_id == ResponseType.APPLY)278 if (response_id == ResponseType.APPLY)
279 {279 {
280 message ("saving...");280 if (this._output.exists () && !this._output.is_writable ())
281 if (!this._output.is_writable ())
282 {281 {
283 // pop up a "Save As" dialog.282 // pop up a "Save As" dialog.
284 FileChooserDialog dialog;283 FileChooserDialog dialog;
@@ -303,6 +302,10 @@
303 {302 {
304 try303 try
305 {304 {
305 if (this._entry.entry_type == DesktopEntryType.UNKNOWN)
306 {
307 this._entry.entry_type = DesktopEntryType.APPLICATION;
308 }
306 this._entry.save (this._output);309 this._entry.save (this._output);
307 }310 }
308 catch (Error err)311 catch (Error err)

Subscribers

People subscribed via source and target branches