Merge lp:~kalikiana/midori/alwaysnotify into lp:midori

Proposed by Cris Dywan
Status: Merged
Approved by: Paweł Forysiuk
Approved revision: 6182
Merged at revision: 6183
Proposed branch: lp:~kalikiana/midori/alwaysnotify
Merge into: lp:midori
Diff against target: 98 lines (+5/-30)
3 files modified
README (+2/-2)
midori/midori-app.c (+0/-23)
wscript (+3/-5)
To merge this branch: bzr merge lp:~kalikiana/midori/alwaysnotify
Reviewer Review Type Date Requested Status
gue5t gue5t Needs Fixing
Paweł Forysiuk Approve
André Stösel Approve
Review via email: mp+166480@code.launchpad.net

Commit message

Make libnotify mandatory except on Windows

Description of the change

Make libnotify mandatory except for now on Windows

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

A very interesting discussion the other day showed that some people may disable libnotify to "customize" Midori's behavior. I think this is misguided and apart from something like openbox libnotify is very unusual to not have available these days.
I'm leaving an exception for Windows for now because we don't have the same expectations there and at least currently don't think it's typical to have notifications there.

Revision history for this message
Cris Dywan (kalikiana) wrote :

Consider https://code.launchpad.net/~kalikiana/midori/manydowns/+merge/166483 for solving some of the behavior aspects people might've been trying to work-around.

Revision history for this message
André Stösel (ivaldi) wrote :

Works fine with Linux, but to be sure it would be nice if Paweł Forysiuk could review it (windows), too.

(Although the changes are really obviously - it's probably unnecessary ;)

review: Approve
Revision history for this message
Paweł Forysiuk (tuxator) wrote :

Seems to work fine on win32

review: Approve
Revision history for this message
gue5t gue5t (gue5t) wrote :

In my opinion it's perfectly sane for users to want some programs to not produce notifications. It's also sane for non-Windows systems to not have libnotify installed, and given that libnotify does not provide essential functionality I don't see why it should be made a hard-dependency. However, I do agree that ./configure is not the right place for users to configure whether on typical desktop systems whether they would like to see notifications from Midori. We should instead have a preference to control notifications.

Removing code that manually calls notify-send is a very good thing. Executing random system binaries is awful and Midori built on a system which wants notification features should depend on the requisite software, i.e. libnotify.

review: Needs Fixing
Revision history for this message
Cris Dywan (kalikiana) wrote :

> It's also sane for non-Windows systems to not have libnotify installed

I'm very doubtful here. All DEs roughly following freedesktop.org use notifications. It's also been proposed for inclusion with GTK+ which by itself says something.

> …libnotify does not provide essential functionality…

I disagree with this assumption and others voiced concerns that for example "launcher created" may not show up without libnotify. It is expected in the typical case, except custom kiosk setups and the like which may intentionally block the notification daemon.

I'll file a bug to re-consider the Windows case. I simply didn't want to block on it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2013-05-16 21:25:22 +0000
+++ README 2013-05-30 11:15:49 +0000
@@ -12,9 +12,9 @@
12* Customizable interface, extensions written in C and Vala.12* Customizable interface, extensions written in C and Vala.
1313
14Requirements: GLib 2.22, GTK+ 2.16, WebkitGTK+ 1.1.17, libXML2,14Requirements: GLib 2.22, GTK+ 2.16, WebkitGTK+ 1.1.17, libXML2,
15 libsoup 2.27.90, sqlite 3.0, Vala 0.1415 libsoup 2.27.90, sqlite 3.0, Vala 0.14, libnotify
1616
17Optional: GTK+ 3.0, Unique 0.9, libnotify, gcr, Granite 0.2, WebKit2GTK+ 1.11.91/ 2.0.017Optional: GTK+ 3.0, Unique 0.9, gcr, Granite 0.2, WebKit2GTK+ 1.11.91/ 2.0.0
1818
19For installation instructions read INSTALL.19For installation instructions read INSTALL.
2020
2121
=== modified file 'midori/midori-app.c'
--- midori/midori-app.c 2013-05-19 09:33:02 +0000
+++ midori/midori-app.c 2013-05-30 11:15:49 +0000
@@ -76,10 +76,6 @@
7676
77 MidoriBrowser* browser;77 MidoriBrowser* browser;
78 MidoriAppInstance instance;78 MidoriAppInstance instance;
79
80 #if !HAVE_LIBNOTIFY
81 gchar* program_notify_send;
82 #endif
83};79};
8480
85static gchar* app_name = NULL;81static gchar* app_name = NULL;
@@ -795,8 +791,6 @@
795791
796 #if HAVE_LIBNOTIFY792 #if HAVE_LIBNOTIFY
797 notify_init (PACKAGE_NAME);793 notify_init (PACKAGE_NAME);
798 #else
799 app->program_notify_send = g_find_program_in_path ("notify-send");
800 #endif794 #endif
801}795}
802796
@@ -824,8 +818,6 @@
824 #if HAVE_LIBNOTIFY818 #if HAVE_LIBNOTIFY
825 if (notify_is_initted ())819 if (notify_is_initted ())
826 notify_uninit ();820 notify_uninit ();
827 #else
828 katze_assign (app->program_notify_send, NULL);
829 #endif821 #endif
830822
831 G_OBJECT_CLASS (midori_app_parent_class)->finalize (object);823 G_OBJECT_CLASS (midori_app_parent_class)->finalize (object);
@@ -1312,21 +1304,6 @@
1312 notify_notification_show (note, NULL);1304 notify_notification_show (note, NULL);
1313 g_object_unref (note);1305 g_object_unref (note);
1314 }1306 }
1315 #else
1316 /* Fall back to the command line program "notify-send" */
1317 if (app->program_notify_send)
1318 {
1319 gchar* msgq = g_shell_quote (message);
1320 gchar* titleq = g_shell_quote (title);
1321 gchar* command = g_strdup_printf ("%s -i midori %s %s",
1322 app->program_notify_send, titleq, msgq);
1323
1324 g_spawn_command_line_async (command, NULL);
1325
1326 g_free (titleq);
1327 g_free (msgq);
1328 g_free (command);
1329 }
1330 #endif1307 #endif
1331}1308}
13321309
13331310
=== modified file 'wscript'
--- wscript 2013-05-22 20:17:41 +0000
+++ wscript 2013-05-30 11:15:49 +0000
@@ -193,12 +193,11 @@
193 uselib_store=var, errmsg=name + ver_str + ' not found')][have])193 uselib_store=var, errmsg=name + ver_str + ' not found')][have])
194 return have194 return have
195195
196 if option_enabled ('libnotify'):196 if is_win32 (os.environ):
197 if not check_pkg ('libnotify', mandatory=False):
198 option_checkfatal ('libnotify', 'notifications')
199 else:
200 conf.define ('LIBNOTIFY_VERSION', 'No')197 conf.define ('LIBNOTIFY_VERSION', 'No')
201 conf.check_message_custom ('libnotify', '', 'disabled')198 conf.check_message_custom ('libnotify', '', 'disabled')
199 else:
200 check_pkg ('libnotify', mandatory=True)
202 conf.define ('HAVE_LIBNOTIFY', [0,1][conf.env['LIBNOTIFY_VERSION'] != 'No'])201 conf.define ('HAVE_LIBNOTIFY', [0,1][conf.env['LIBNOTIFY_VERSION'] != 'No'])
203202
204 if option_enabled ('granite'):203 if option_enabled ('granite'):
@@ -419,7 +418,6 @@
419418
420 group = opt.add_option_group ('Optional features', '')419 group = opt.add_option_group ('Optional features', '')
421 add_enable_option ('unique', 'single instance support', group, disable=is_win32 (os.environ))420 add_enable_option ('unique', 'single instance support', group, disable=is_win32 (os.environ))
422 add_enable_option ('libnotify', 'notification support', group)
423 add_enable_option ('granite', 'new notebook, pop-overs', group, disable=True)421 add_enable_option ('granite', 'new notebook, pop-overs', group, disable=True)
424 add_enable_option ('addons', 'building of extensions', group)422 add_enable_option ('addons', 'building of extensions', group)
425 add_enable_option ('tests', 'install tests', group, disable=True)423 add_enable_option ('tests', 'install tests', group, disable=True)

Subscribers

People subscribed via source and target branches

to all changes: