review approve
On Tue, 2011-01-25 at 16:44 +0000, Michael Terry wrote: > Michael Terry has proposed merging lp:~mterry/indicator-appmenu/ignore-non-window-views into lp:indicator-appmenu. > > Requested reviews: > Indicator Applet Developers (indicator-applet-developers) > > For more details, see: > https://code.launchpad.net/~mterry/indicator-appmenu/ignore-non-window-views/+merge/47420 > > On view-opened or view-closed signals, the view is not guaranteed to be a window (may be an app). The current code was throwing critical warnings when it encountered an app, so this just sanitizes the input a bit better. > differences between files attachment (review-diff.txt) > === modified file 'src/indicator-appmenu.c' > --- src/indicator-appmenu.c 2011-01-14 04:44:29 +0000 > +++ src/indicator-appmenu.c 2011-01-25 16:43:53 +0000 > @@ -740,11 +740,11 @@ > static void > new_window (BamfMatcher * matcher, BamfView * view, gpointer user_data) > { > + if (view == NULL || !BAMF_IS_WINDOW(view)) { > + return; > + } > + > BamfWindow * window = BAMF_WINDOW(view); > - if (window == NULL) { > - return; > - } > - > if (bamf_window_get_window_type(window) != BAMF_WINDOW_DESKTOP) { > return; > } > @@ -772,11 +772,11 @@ > static void > old_window (BamfMatcher * matcher, BamfView * view, gpointer user_data) > { > + if (view == NULL || !BAMF_IS_WINDOW(view)) { > + return; > + } > + > BamfWindow * window = BAMF_WINDOW(view); > - if (window == NULL) { > - return; > - } > - > if (bamf_window_get_window_type(window) != BAMF_WINDOW_DESKTOP) { > return; > } >
« Back to merge proposal
review approve
On Tue, 2011-01-25 at 16:44 +0000, Michael Terry wrote: applet- developers) /code.launchpad .net/~mterry/ indicator- appmenu/ ignore- non-window- views/+ merge/47420 appmenu. c' appmenu. c 2011-01-14 04:44:29 +0000 appmenu. c 2011-01-25 16:43:53 +0000 WINDOW( view)) { get_window_ type(window) != BAMF_WINDOW_ DESKTOP) { WINDOW( view)) { get_window_ type(window) != BAMF_WINDOW_ DESKTOP) {
> Michael Terry has proposed merging lp:~mterry/indicator-appmenu/ignore-non-window-views into lp:indicator-appmenu.
>
> Requested reviews:
> Indicator Applet Developers (indicator-
>
> For more details, see:
> https:/
>
> On view-opened or view-closed signals, the view is not guaranteed to be a window (may be an app). The current code was throwing critical warnings when it encountered an app, so this just sanitizes the input a bit better.
> differences between files attachment (review-diff.txt)
> === modified file 'src/indicator-
> --- src/indicator-
> +++ src/indicator-
> @@ -740,11 +740,11 @@
> static void
> new_window (BamfMatcher * matcher, BamfView * view, gpointer user_data)
> {
> + if (view == NULL || !BAMF_IS_
> + return;
> + }
> +
> BamfWindow * window = BAMF_WINDOW(view);
> - if (window == NULL) {
> - return;
> - }
> -
> if (bamf_window_
> return;
> }
> @@ -772,11 +772,11 @@
> static void
> old_window (BamfMatcher * matcher, BamfView * view, gpointer user_data)
> {
> + if (view == NULL || !BAMF_IS_
> + return;
> + }
> +
> BamfWindow * window = BAMF_WINDOW(view);
> - if (window == NULL) {
> - return;
> - }
> -
> if (bamf_window_
> return;
> }
>