debian/0000775000000000000000000000000012323111233007157 5ustar debian/activity-log-manager.install0000664000000000000000000000000412323111231014562 0ustar usr debian/source/0000775000000000000000000000000012323111231010455 5ustar debian/source/format0000664000000000000000000000001412323111231011663 0ustar 3.0 (quilt) debian/activity-log-manager.lintian-overrides0000664000000000000000000000036712323111231016566 0ustar activity-log-manager: desktop-command-not-in-package activity-log-manager: pkg-has-shlibs-control-file-but-no-actual-shared-libs activity-log-manager: postinst-has-useless-call-to-ldconfig activity-log-manager: postrm-has-useless-call-to-ldconfig debian/rules0000775000000000000000000000066012323111231010237 0ustar #!/usr/bin/make -f %: dh $@ --with translations,autoreconf override_dh_auto_configure: dh_auto_configure -- --with-ccpanel --with-whoopsie override_dh_install: rm -f debian/tmp/usr/lib/*/control-center-1/panels/*a rm -f debian/tmp/usr/lib/*/unity-control-center-1/panels/*a rm -f debian/tmp/usr/share/doc/activity-log-manager/COPYING rm -f debian/tmp/usr/share/doc/activity-log-manager/INSTALL dh_install --fail-missing debian/compat0000664000000000000000000000000212323111231010353 0ustar 9 debian/changelog0000664000000000000000000003266112323111231011037 0ustar activity-log-manager (0.9.7-0ubuntu14) trusty; urgency=medium * debian/patches/16_fix_links_in_ucc.patch: - Fix links from panel not showing in Unity Control Center (LP: #1306840) -- Robert Ancell Tue, 15 Apr 2014 13:47:34 +1200 activity-log-manager (0.9.7-0ubuntu13) trusty; urgency=medium * Don't try to get properties if the interface doesn't have an owner, to break a loop when whoopsie-preferences exits. (LP: #1261096) -- Iain Lane Fri, 04 Apr 2014 17:10:14 +0100 activity-log-manager (0.9.7-0ubuntu12) trusty; urgency=medium * debian/patches/10_build-with-gee-0.8.patch: Port to gee 0.8 API to avoid loading two gee versions in the same process (LP: #1293036) * 01_really_hide_automatic_reports.patch: Delete, this is obsolete given 03_use_libwhoopsie-preferences.patch. Add 13_hide_automatic_reports.patch to achieve this with that new patch. (LP: #1203042) * 11_make_all_widgets_sensitive.patch: Recursively make all widgets sensitive/insensitive when we need to, to avoid missing some. * 12_hide_lock_unlock_button.patch: Hide Lock button when it doesn't do anything (when the user can't drop the permissions). (LP: #1239752) * 14_seconds_combo.patch: Make the entries translatable. (LP: #1235627) -- Iain Lane Tue, 25 Mar 2014 12:56:33 +0000 activity-log-manager (0.9.7-0ubuntu11) trusty; urgency=medium * Unify the options between the 'brightness and lock' panel in g-c-c and alm. (LP: #1278392) -- Iain Lane Mon, 24 Mar 2014 15:20:29 +0000 activity-log-manager (0.9.7-0ubuntu10) trusty; urgency=medium * debian/patches/08_directory_icons.patch: - Fix directory icons not being shown for known directories * debian/patches/09_security_spacing.patch: - Fix inconsistent spacing on the security settings page -- Robert Ancell Mon, 03 Feb 2014 16:20:55 +0000 activity-log-manager (0.9.7-0ubuntu9) trusty; urgency=medium * debian/patches/07_proxy_unref.patch: - Fix crash opening and closing security panel (LP: #1275736) -- Robert Ancell Mon, 03 Feb 2014 13:46:50 +0000 activity-log-manager (0.9.7-0ubuntu8) trusty; urgency=medium * debian/patches/06_panel_width.patch: * debian/patches/03_use_libwhoopsie-preferences.patch: - Stop control center panel from expanding too wide (LP: #1265239) -- Robert Ancell Mon, 03 Feb 2014 10:46:11 +0000 activity-log-manager (0.9.7-0ubuntu7) trusty; urgency=medium * debian/rules: - Don't install Unity control center static library * debian/patches/04_unity_control_center.patch: - Fix whoopsie panel not showing * debian/patches/05_files_and_apps_description.patch: - Set descriptive text in Files and Applications tab to match design in https://wiki.ubuntu.com/SecurityAndPrivacySettings#files (LP: #1263123) -- Robert Ancell Fri, 31 Jan 2014 16:00:38 +1300 activity-log-manager (0.9.7-0ubuntu6) trusty; urgency=medium * debian/patches/04_unity_control_center.patch: - Fix panel not working in GNOME control center (LP: #1274728) -- Robert Ancell Fri, 31 Jan 2014 11:39:25 +1300 activity-log-manager (0.9.7-0ubuntu5) trusty; urgency=medium * debian/patches/04_unity_control_center.patch: - Support unity-control-center (LP: #1257505) -- Robert Ancell Tue, 28 Jan 2014 11:37:11 +1300 activity-log-manager (0.9.7-0ubuntu4) saucy; urgency=low * debian/patches/03_use_libwhoopsie-preferences.patch: - Use libwhoopsie-preferences0 instead of building it in tree. Taken from trunk. -- Evan Dandrea Thu, 25 Jul 2013 10:49:10 +0100 activity-log-manager (0.9.7-0ubuntu3) saucy; urgency=low * activity-log-manager-common is an obsolete package - use Conflicts/Replaces, not a versioned Breaks/Replaces. -- Steve Langasek Sun, 14 Jul 2013 09:39:48 -0700 activity-log-manager (0.9.7-0ubuntu2) saucy; urgency=low * debian/rules: Undo override of multiarch directories -- Jeremy Bicha Wed, 10 Jul 2013 14:13:24 -0400 activity-log-manager (0.9.7-0ubuntu1) saucy; urgency=low * New upstream release. - System Settings panel has been renamed to "Security and Privacy" - New Security tab (LP: #1189313) - Incognito Mode now stops GtkRecentManager logging (LP: #992338) - Deleting all history also purges entries in GtkRecentManager (LP: #992338) * Use dh compat 9 * debian/rules: - Disable multiarch direcctories since the System Settings panel doesn't work installed there yet * debian/patches/02_update_standalone_title.patch: * debian/patches/06_add_unity_dash_privacy.patch: - Dropped, applied in new release * debian/patches/02_dont_show_nonexistant_log_types.patch: - Ubuntu doesn't include data loggers for Email or Webpages so don't show them in the Include list. -- Jeremy Bicha Wed, 10 Jul 2013 11:17:30 -0400 activity-log-manager (0.9.6-0ubuntu1) saucy; urgency=low * New upstream release. (LP: #1189253, #1050620, #1167531) * Don't split control-center plugin to a separate package * debian/control: - Bump minimum vala - Build-depend on libwhoopsie-dev, libzeitgeist-2.0-dev, and libgcrypt11-dev (LP: #1197569) * debian/watch: Fixed * Dropped patches applied in new version: - 01_move_to_personal_section.patch - 02_handle_upstart_in_whoopsie.patch: - 03_correct_path_to_whoopsie_preferences.patch: - 04_correct_privacy_policy_url.patch: - 05_add_missing_configvapi.patch - 05_fix_userdirs.patch * debian/patches/01_really_hide_automatic_reports.patch: - Don't show "Send automatic reports" since that feature isn't implemented yet * debian/patches/02_update_standalone_title.patch: - Update the title of the standalone app to Activity Log Manager too * debian/patches/06_add_unity_dash_privacy.patch: - Refreshed and set to only show when Unity is running (LP: #1082552) -- Jeremy Bicha Thu, 04 Jul 2013 12:32:19 -0400 activity-log-manager (0.9.4-0ubuntu6.1) raring; urgency=low * debian/patches/06_add_unity_dash_privacy.patch: - drop trailing period from the online result label (lp: #1061930) [ Margarita Manterola ] * 05_fix_userdirs.patch: - Verify that a user directory exists before adding it to the hash map. (LP: #1024057) -- Sebastien Bacher Mon, 26 Nov 2012 15:45:31 +0100 activity-log-manager (0.9.4-0ubuntu6) raring; urgency=low * Breaks and Replaces for the previous upload. -- Evan Dandrea Wed, 14 Nov 2012 11:58:18 +0000 activity-log-manager (0.9.4-0ubuntu5) raring; urgency=low * Move /usr/bin/whoopsie-preferences from activity-log-manager, which isn't installed by default, to activity-log-manager-control-center, which is (LP: #993056). -- Evan Dandrea Wed, 14 Nov 2012 11:53:21 +0000 activity-log-manager (0.9.4-0ubuntu4) quantal; urgency=low * debian/patches/05_add_missing_configvapi.patch: - add missing file which should be disted upstream for autoreconf * Run autoreconf when building * debian/patches/06_add_unity_dash_privacy.patch: - add unity dash privacy tab to the privacy g-c-c panel (LP: #1054746) -- Didier Roche Wed, 26 Sep 2012 14:03:52 +0200 activity-log-manager (0.9.4-0ubuntu3) precise; urgency=low * 02_handle_upstart_in_whoopsie.patch: - Run initctl start/stop whoopsie when enabling/disabling crash reporting (LP: #978917). * 03_correct_path_to_whoopsie_preferences.patch: - The whoopsie_preferences binary is currently installed to /usr/bin. * 04_correct_privacy_policy_url.patch: - Add a parameter to the end of the privacy policy URL, so that a policy specific to crash reporting can be provided. -- Evan Dandrea Wed, 11 Apr 2012 16:41:38 +0100 activity-log-manager (0.9.4-0ubuntu2) precise; urgency=low * 01_move_to_personal_section.patch: - [UIFE] Adding landscape installer caused UI overflow (LP: #973130) -- Didier Roche Wed, 04 Apr 2012 13:31:02 +0200 activity-log-manager (0.9.4-0ubuntu1) precise; urgency=low * New upstream release - make Diagnositics tab translatable (LP: #957891, #958483) - X-GNOME-Keywords is changed to Keywords (LP: #949849) - Fix untranslated strings in Application and History tab - Add border to folder blacklist TreeView - Fixed a segmentation fault dued to null pixbufs. - Make the AppSelection dialog to be orderer automatically by usage. - Force the size of the blacklisted directory's text to be consistent with the size of the label above. - Use "gtk-execute" as application's icon if the application's icon isn't in the current IconTheme. - Added "Today" and "Yesterday" instead of the date, matching the mockup. - The Folders blacklisted have icons if they are special folders - The blacklisted Folders list show the folder name and the folder path for each entry - [UIFe] Blacklisted special folder icons (from nautilus). (LP: #960498) * debian/watch: - update to latest upstream url * debian/control: - bump Standards-Version -- Didier Roche Wed, 21 Mar 2012 11:16:03 +0100 activity-log-manager (0.9.3-0ubuntu1) precise; urgency=low * New upstream release - Application blacklist does not block application launches (LP: #930093) - Application selection TreeView should show last used and usage (LP: #925638) - Typo in /src/history-widget.vala:68 (LP: #944993) - The Application selection list shows usage of applications - Some whoopsie related files have been added to i18n system * debian/patches/fix-i18n.patch: - removed, usptreamed -- Didier Roche Mon, 05 Mar 2012 17:30:46 +0100 activity-log-manager (0.9.2-0ubuntu3) precise; urgency=low * debian/patches/fix-i18n.patch: - Add policy.in file to POTFILES.in, - Makefile changes to make the policy file translatable - Add type description to the ui file, to extract its messages correctly, - Rename policy file to make it translatable, also remove gettext domain info. * Run dh_translations during build, also build-dep on it. (LP: #944362) -- Gabor Kelemen Fri, 02 Mar 2012 09:36:44 +0100 activity-log-manager (0.9.2-0ubuntu2) precise; urgency=low * Fix the whoopsie breaks/replaces to use the right version comparison. LP: #939842. -- Steve Langasek Thu, 23 Feb 2012 13:52:12 -0800 activity-log-manager (0.9.2-0ubuntu1) precise; urgency=low * New upstream release - get rid of all the gtk warnings (LP: #932147) - Integrate diagnostics application from whoopsie (LP: #933042) - get i18n support (LP: #932145) - Check for availability of desktop-file-validate when running configure script (LP: #928254) - Rename "Delete" in history tab to "Delete History" (LP: #932894) - Diagnostics is whoopsie's UI to enable disable error reporting - Diagnostics can be enabled using --with-whoopsie - If --with-whoopsie is passed, then --with-ccpanel is redundant * debian/watch: - point to the new upstream file * debian/rules, debian/control, debian/activity-log-manager-control-center.install: - build with --with-whoopsie now (the code is already in precise, just moving between packages) - activity-log-manager-control-center Breaks/Replaces on older whoopsie - now build-dep on libpolkit-gobject-1-dev - install files previously in whoopsie -- Didier Roche Thu, 23 Feb 2012 18:47:55 +0100 activity-log-manager (0.9.1-0ubuntu2) precise; urgency=low * debian/*.install: - install new desktop files -- Didier Roche Tue, 14 Feb 2012 14:08:06 +0100 activity-log-manager (0.9.1-0ubuntu1) precise; urgency=low * New upstream release: - The .desktop.in files don't match with executable file name (LP: #928946) - History tab always shows "Are you sure you want to delete the history from __ to __" even in all selection (LP: #930742) - Folder blacklisting doesn't use valid URI (LP: #899096) * debian/watch: - point to the new upstream launchpad tarball -- Didier Roche Tue, 14 Feb 2012 10:11:47 +0100 activity-log-manager (0.9.0.1-0ubuntu1) precise; urgency=low * New upstream release, with gnome-control-center integration * debian/copyright: - update to the new content files * debian/pyversions, debian/control, debian/rules: - update to the new vala version (transition from the python one) with new build-deps - remove the .la .a files * debian/rules, debian/control, debian/*.install - pass --with-ccpanel to build the g-c-c panel integration - list the new upstream launchpad page - add activity-log-manager-control-center package containing only the control center integration and activity-log-manager-common for the asset - remove COPYING file shipped by upstream on make install * debian/watch: - point to the new upstream launchpad tarball -- Didier Roche Wed, 08 Feb 2012 16:00:51 +0100 activity-log-manager (0.8.0-1) unstable; urgency=low * Initial packaging (Closes: #626831). -- Siegfried-Angel Gevatter Pujals Mon, 16 May 2011 23:41:37 +0200 debian/control0000664000000000000000000000427312323111231010566 0ustar Source: activity-log-manager Section: utils Priority: optional Maintainer: Siegfried-Angel Gevatter Pujals Build-Depends: debhelper (>= 9), desktop-file-utils, dh-autoreconf, dh-translations, intltool (>= 0.35.0), # libaccountsservice-dev, libgcrypt11-dev, libgee-0.8-dev, libglib2.0-dev, libgnome-control-center-dev, libunity-control-center-dev, libgtk-3-dev, libpolkit-gobject-1-dev, libwhoopsie-preferences-dev, libzeitgeist-2.0-dev, valac (>= 0.16.0) Homepage: https://launchpad.net/activity-log-manager Standards-Version: 3.9.4 Package: activity-log-manager Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, zeitgeist-core (>= 0.8~) | zeitgeist (>= 0.8~), whoopsie-preferences Breaks: activity-log-manager-control-center (<< 0.9.6) Conflicts: activity-log-manager-common Replaces: activity-log-manager-common, activity-log-manager-control-center (<< 0.9.6) Description: blacklist configuration user interface for Zeitgeist Zeitgeist is a service which logs the user's activities and events (files opened, websites visited, conversations held with other people, etc.) and makes the relevant information available to other applications. . It serves as a comprehensive activity log and also makes it possible to determine relationships between items based on usage patterns. . This package contains Activity Log Manager, a graphical user interface which lets you control what gets logged by Zeitgeist. It supports setting up blacklists according to several criteria (such as application or file types), temporarily stopping all logging as well as deleting recent events. Package: activity-log-manager-control-center Architecture: all Priority: extra Section: oldlibs Depends: ${misc:Depends}, ${shlibs:Depends}, activity-log-manager Description: blacklist configuration for Zeitgeist (transitional package) This is a transitional package to ease upgrades to activity-log-manager. It can be safely removed. debian/patches/0000775000000000000000000000000012323111231010604 5ustar debian/patches/16_fix_links_in_ucc.patch0000664000000000000000000000342712323111231015447 0ustar === modified file 'src/security-widget.vala' Index: activity-log-manager-0.9.7/src/security-widget.vala =================================================================== --- activity-log-manager-0.9.7.orig/src/security-widget.vala 2014-04-15 13:55:19.845594272 +1200 +++ activity-log-manager-0.9.7/src/security-widget.vala 2014-04-15 13:55:19.841594272 +1200 @@ -122,7 +122,12 @@ var link_password = new Gtk.LinkButton (_("Password Settings")); link_password.activate_link.connect (() => { try { - Process.spawn_command_line_async ("gnome-control-center user-accounts"); + var have_ucc = Environment.find_program_in_path ("unity-control-center") != null; + var have_gcc = Environment.find_program_in_path ("gnome-control-center") != null; + if (have_ucc && (!have_gcc || Environment.get_variable ("XDG_CURRENT_DESKTOP") == "Unity")) + Process.spawn_command_line_async ("unity-control-center user-accounts"); + else + Process.spawn_command_line_async ("gnome-control-center user-accounts"); } catch (SpawnError e) { warning ("%s", e.message); } @@ -135,7 +140,12 @@ var link_power = new Gtk.LinkButton(_("Power Settings")); link_power.activate_link.connect (() => { try { - Process.spawn_command_line_async ("gnome-control-center power"); + var have_ucc = Environment.find_program_in_path ("unity-control-center") != null; + var have_gcc = Environment.find_program_in_path ("gnome-control-center") != null; + if (have_ucc && (!have_gcc || Environment.get_variable ("XDG_CURRENT_DESKTOP") == "Unity")) + Process.spawn_command_line_async ("unity-control-center power"); + else + Process.spawn_command_line_async ("gnome-control-center power"); } catch (SpawnError e) { warning ("%s", e.message); } debian/patches/11_make_all_widgets_sensitive.patch0000664000000000000000000000412212323111231017511 0ustar Description: Make all widgets sensitive, recursively Author: Iain Lane Index: b/src/diagnostics-widget.c =================================================================== --- a/src/diagnostics-widget.c +++ b/src/diagnostics-widget.c @@ -100,6 +100,17 @@ } static void +gtk_widget_set_sensitive_recursive (GtkWidget *widget, + gpointer data) +{ + gboolean allowed = *((gboolean *) data); + gtk_widget_set_sensitive (widget, allowed); + if (GTK_IS_CONTAINER (widget)) + gtk_container_foreach (GTK_CONTAINER (widget), + (GtkCallback)gtk_widget_set_sensitive_recursive, data); +} + +static void on_permission_changed (GPermission* permission, GParamSpec* pspec, gpointer data) { gboolean allowed; @@ -115,8 +126,12 @@ allowed = g_permission_get_allowed (permission); gtk_widget_set_sensitive(error_reports_box, allowed); gtk_widget_set_sensitive(metrics_reports_box, allowed); - gtk_container_foreach (GTK_CONTAINER (error_reports_box), (GtkCallback)gtk_widget_set_sensitive, allowed); - gtk_container_foreach (GTK_CONTAINER (metrics_reports_box), (GtkCallback)gtk_widget_set_sensitive, allowed); + gtk_container_foreach (GTK_CONTAINER (error_reports_box), + (GtkCallback)gtk_widget_set_sensitive_recursive, + &allowed); + gtk_container_foreach (GTK_CONTAINER (metrics_reports_box), + (GtkCallback)gtk_widget_set_sensitive_recursive, + &allowed); } static void @@ -237,9 +252,8 @@ unlock_button = gtk_lock_button_new (priv->permission); gtk_container_add (GTK_CONTAINER (unlock_align), GTK_WIDGET (unlock_button)); - gtk_widget_show (unlock_button); - g_signal_connect (priv->permission, "notify", G_CALLBACK (on_permission_changed), self); + g_signal_connect (priv->permission, "notify::allowed", G_CALLBACK (on_permission_changed), self); on_permission_changed (priv->permission, NULL, self); whoopsie_daisy_preferences_setup_dbus (self, error); debian/patches/08_directory_icons.patch0000664000000000000000000000070412323111231015334 0ustar === modified file 'src/unified-privacy.vala' --- old/src/unified-privacy.vala 2013-07-11 02:13:34 +0000 +++ new/src/unified-privacy.vala 2014-02-03 14:47:30 +0000 @@ -136,6 +136,7 @@ UserDirectory.VIDEOS }; + defined_dirs = new HashMap(str_hash, str_equal); for(int i = 0; i < special_dirs.length; i++) { string dir_path = Environment.get_user_special_dir(special_dirs[i]); if (dir_path != null) { debian/patches/15_check-bus-name-owner0000664000000000000000000000133012323111231014743 0ustar Description: Don't try to get properties if the interface doesn't have an owner yet, to break a loop when whoopsie-preferences exits. Author: Iain Lane Index: b/src/diagnostics-widget.c =================================================================== --- a/src/diagnostics-widget.c +++ b/src/diagnostics-widget.c @@ -179,6 +179,9 @@ const gchar* const* invalidated_properties, gpointer user_data) { + if (!g_dbus_proxy_get_name_owner(interface)) + return; + WhoopsieDaisyPreferencesPrivate* priv = WHOOPSIE_DAISY_PREFERENCES (user_data)->priv; gboolean report_errors, report_metrics; GtkWidget* submit_error_reports = NULL; debian/patches/02_dont_show_nonexistant_log_types.patch0000664000000000000000000000220512323111231020650 0ustar Author: Jeremy Bicha Description: Ubuntu doesn't ship providers for Emails or Websites so don't list them in the Include list Index: activity-log-manager-0.9.7/src/unified-privacy.vala =================================================================== --- activity-log-manager-0.9.7.orig/src/unified-privacy.vala 2013-07-10 02:16:31.208467676 -0400 +++ activity-log-manager-0.9.7/src/unified-privacy.vala 2013-07-10 02:17:40.372464783 -0400 @@ -122,8 +121,6 @@ mime_dict.set(_("Presentations"), NFO.PRESENTATION); mime_dict.set(_("Spreadsheets"), NFO.SPREADSHEET); mime_dict.set(_("Chat Logs"), NMO.IMMESSAGE); - mime_dict.set(_("Emails"), NMO.EMAIL); - mime_dict.set(_("Websites"), NFO.WEBSITE); UserDirectory[] special_dirs = { @@ -333,7 +327,7 @@ general_hbox.pack_start(checkbox_vbox, true); general_hbox.pack_start(exception_vbox, true); - this.pack_start(general_hbox, false); + this.pack_start(general_hbox, true); this.app_dialog = new ApplicationsChooserDialog (app_blacklist, blocked_list, unblocked_list); this.delete_dialog = new DeleteHistoryDialog (del_button); debian/patches/12_hide_lock_unlock_button.patch0000664000000000000000000000420612323111231017020 0ustar Description: Hide lock/unlock button when it doesn't do anything (when the user can't drop the privs) Author: Iain Lane Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/activity-log-manager/+bug/1239752 Index: b/data/whoopsie.ui =================================================================== --- a/data/whoopsie.ui +++ b/data/whoopsie.ui @@ -86,6 +86,7 @@ + True True False 1 Index: b/src/diagnostics-widget.c =================================================================== --- a/src/diagnostics-widget.c +++ b/src/diagnostics-widget.c @@ -135,6 +135,17 @@ } static void +on_permission_changed_widget (GPermission *permission, GParamSpec *pspec, gpointer data) +{ + GtkWidget *widget = GTK_WIDGET (data); + + if (g_permission_get_allowed (permission) && !g_permission_get_can_release (permission)) + gtk_widget_hide (widget); + else + gtk_widget_show (widget); +} + +static void on_submit_error_reports_checked (GtkToggleButton* button, gpointer user_data) { WhoopsieDaisyPreferencesPrivate* priv = WHOOPSIE_DAISY_PREFERENCES (user_data)->priv; @@ -254,7 +265,12 @@ gtk_container_add (GTK_CONTAINER (unlock_align), GTK_WIDGET (unlock_button)); g_signal_connect (priv->permission, "notify::allowed", G_CALLBACK (on_permission_changed), self); + g_signal_connect (priv->permission, "notify::allowed", G_CALLBACK (on_permission_changed_widget), + unlock_button); + g_signal_connect (priv->permission, "notify::can-release", G_CALLBACK (on_permission_changed_widget), + unlock_button); on_permission_changed (priv->permission, NULL, self); + on_permission_changed_widget (priv->permission, NULL, unlock_align); whoopsie_daisy_preferences_setup_dbus (self, error); if (error) { debian/patches/07_proxy_unref.patch0000664000000000000000000001052112323111231014512 0ustar === modified file 'src/diagnostics-widget.c' --- old/src/diagnostics-widget.c 2013-07-19 10:31:55 +0000 +++ new/src/diagnostics-widget.c 2014-02-03 13:39:22 +0000 @@ -8,8 +8,6 @@ #include "whoopsie-preferences/libwhoopsie-preferences.h" -static WhoopsiePreferences* proxy = NULL; - #define POL_PATH "com.ubuntu.whoopsiepreferences.change" #define PRIVACY_URL "http://www.ubuntu.com/aboutus/privacypolicy?crashdb" #define SYSTEM_ERRORS_URL "https://errors.ubuntu.com/user" @@ -31,6 +29,7 @@ { GtkBuilder* builder; GPermission* permission; + WhoopsiePreferences* proxy; }; struct _WhoopsieDaisyPreferences @@ -59,6 +58,10 @@ g_object_unref (priv->permission); priv->permission = NULL; } + if (priv->proxy) { + g_object_unref (priv->proxy); + priv->proxy = NULL; + } } static void @@ -79,10 +82,12 @@ static void on_show_previous_reports_clicked (GtkWidget* button, gpointer user_data) { + WhoopsieDaisyPreferencesPrivate* priv = WHOOPSIE_DAISY_PREFERENCES (user_data)->priv; GError* error = NULL; gchar* identifier = NULL; gchar* command = NULL; - whoopsie_preferences_call_get_identifier_sync (proxy, &identifier, NULL, &error); + + whoopsie_preferences_call_get_identifier_sync (priv->proxy, &identifier, NULL, &error); if (!error) { asprintf (&command, "xdg-open " SYSTEM_ERRORS_URL "/%s", identifier); @@ -117,9 +122,10 @@ static void on_submit_error_reports_checked (GtkToggleButton* button, gpointer user_data) { + WhoopsieDaisyPreferencesPrivate* priv = WHOOPSIE_DAISY_PREFERENCES (user_data)->priv; GError* error = NULL; - whoopsie_preferences_call_set_report_crashes_sync (proxy, + whoopsie_preferences_call_set_report_crashes_sync (priv->proxy, gtk_toggle_button_get_active (button), NULL, &error); if (error != NULL) { g_printerr ("Error setting crash reporting: %s\n", error->message); @@ -130,9 +136,10 @@ static void on_submit_metrics_reports_checked (GtkToggleButton* button, gpointer user_data) { + WhoopsieDaisyPreferencesPrivate* priv = WHOOPSIE_DAISY_PREFERENCES (user_data)->priv; GError* error = NULL; - whoopsie_preferences_call_set_report_metrics_sync (proxy, + whoopsie_preferences_call_set_report_metrics_sync (priv->proxy, gtk_toggle_button_get_active (button), NULL, &error); if (error != NULL) { g_printerr ("Error setting metrics reporting: %s\n", error->message); @@ -166,17 +173,19 @@ static void whoopsie_daisy_preferences_setup_dbus (WhoopsieDaisyPreferences *self, GError *error) { - proxy = whoopsie_preferences_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, + WhoopsieDaisyPreferencesPrivate* priv = self->priv; + + priv->proxy = whoopsie_preferences_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, "com.ubuntu.WhoopsiePreferences", "/com/ubuntu/WhoopsiePreferences", NULL, &error); - if (!proxy) + if (!priv->proxy) return; - g_signal_connect (proxy, "g-properties-changed", + g_signal_connect (priv->proxy, "g-properties-changed", G_CALLBACK (on_properties_changed), self); - on_properties_changed (proxy, NULL, NULL, self); + on_properties_changed (priv->proxy, NULL, NULL, self); } static void whoopsie_daisy_preferences_init (WhoopsieDaisyPreferences *self) @@ -237,13 +246,13 @@ } g_signal_connect (submit_error_reports, "toggled", - G_CALLBACK (on_submit_error_reports_checked), NULL); + G_CALLBACK (on_submit_error_reports_checked), self); g_signal_connect (submit_metrics_reports, "toggled", - G_CALLBACK (on_submit_metrics_reports_checked), NULL); + G_CALLBACK (on_submit_metrics_reports_checked), self); g_signal_connect (privacy_policy, "clicked", - G_CALLBACK (on_privacy_policy_clicked), NULL); + G_CALLBACK (on_privacy_policy_clicked), self); g_signal_connect (show_previous_reports, "clicked", - G_CALLBACK (on_show_previous_reports_clicked), NULL); + G_CALLBACK (on_show_previous_reports_clicked), self); } GtkWidget* debian/patches/10_build-with-gee-0.8.patch0000664000000000000000000000614012323111231015237 0ustar Description: Port to Gee 0.8 API Authors: Iain Lane Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/activity-log-manager/+bug/1293036 Index: b/configure.ac =================================================================== --- a/configure.ac +++ b/configure.ac @@ -43,7 +43,7 @@ PKG_CHECK_MODULES(ZEITGEIST, zeitgeist-2.0, [HAVE_LIBZG=yes]) PKG_CHECK_MODULES(GTK, gtk+-3.0, [HAVE_GTK=yes]) -PKG_CHECK_MODULES(GEE, gee-1.0, [HAVE_GEE=yes]) +PKG_CHECK_MODULES(GEE, gee-0.8, [HAVE_GEE=yes]) PKG_CHECK_MODULES(GIO_UNIX, gio-unix-2.0, [HAVE_GIO_UNIX=yes]) PKG_CHECK_MODULES(POLKIT, polkit-gobject-1, [HAVE_POLKIT=yes], [HAVE_POLKIT=no]) PKG_CHECK_MODULES(LIBWHOOPSIEPREFS, libwhoopsie-preferences, [HAVE_LIBWHOOPSIE=yes], [HAVE_LIBWHOOPSIE=no]) Index: b/src/Makefile.am =================================================================== --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,7 +4,7 @@ --pkg zeitgeist-2.0 \ --pkg glib-2.0 \ --pkg gtk+-3.0 \ - --pkg gee-1.0 \ + --pkg gee-0.8 \ --target-glib=2.26 \ --pkg gio-unix-2.0 \ config.vapi Index: b/src/gnome-control-center/Makefile.am =================================================================== --- a/src/gnome-control-center/Makefile.am +++ b/src/gnome-control-center/Makefile.am @@ -2,7 +2,7 @@ --pkg zeitgeist-2.0 \ --pkg glib-2.0 \ --pkg gtk+-3.0 \ - --pkg gee-1.0 \ + --pkg gee-0.8 \ --target-glib=2.26 \ --pkg gio-unix-2.0 \ ../config.vapi Index: b/src/unity-control-center/Makefile.am =================================================================== --- a/src/unity-control-center/Makefile.am +++ b/src/unity-control-center/Makefile.am @@ -2,7 +2,7 @@ --pkg zeitgeist-2.0 \ --pkg glib-2.0 \ --pkg gtk+-3.0 \ - --pkg gee-1.0 \ + --pkg gee-0.8 \ --target-glib=2.26 \ --pkg gio-unix-2.0 \ ../config.vapi Index: b/src/unified-privacy.vala =================================================================== --- a/src/unified-privacy.vala +++ b/src/unified-privacy.vala @@ -114,7 +114,8 @@ remove_folder_from_view(folder); }); - mime_dict = new HashMap(str_hash, str_equal); + mime_dict = new HashMap((Gee.HashDataFunc) str_hash, + (Gee.EqualDataFunc) str_equal); mime_dict.set(_("Music"), NFO.AUDIO); mime_dict.set(_("Videos"), NFO.VIDEO); mime_dict.set(_("Pictures"), NFO.IMAGE); @@ -135,7 +136,8 @@ UserDirectory.VIDEOS }; - defined_dirs = new HashMap(str_hash, str_equal); + defined_dirs = new HashMap((Gee.HashDataFunc) str_hash, + (Gee.EqualDataFunc) str_equal); for(int i = 0; i < special_dirs.length; i++) { string dir_path = Environment.get_user_special_dir(special_dirs[i]); if (dir_path != null) { @@ -213,7 +215,7 @@ // Checkbox Box var checkbox_hbox = new Box(Orientation.VERTICAL, 0); - CompareFunc mime_compare = (s1, s2) => { + GLib.CompareDataFunc mime_compare = (s1, s2) => { return s1.collate(s2); }; Gee.ArrayList keys = new Gee.ArrayList(); debian/patches/04_unity_control_center.patch0000664000000000000000000003501012323111231016377 0ustar Description: Support unity-control-center Bug: https://bugs.launchpad.net/bugs/1257505 === modified file 'configure.ac' Index: activity-log-manager-0.9.7/configure.ac =================================================================== --- activity-log-manager-0.9.7.orig/configure.ac 2014-02-03 11:31:13.321257014 +0000 +++ activity-log-manager-0.9.7/configure.ac 2014-02-03 11:31:13.317257014 +0000 @@ -102,13 +102,39 @@ ] ) +PKG_CHECK_MODULES(UNITY_CCPANEL, libunity-control-center, + [ + AC_SUBST(UNITY_CCPANEL_CFLAGS) + AC_SUBST(UNITY_CCPANEL_LIBS) + if test "x$with_whoopsie" != xcheck && test "x$HAVE_POLKIT" != xyes; then + AC_MSG_FAILURE( + [--with-whoopsie was given, but polkit-gobject-1 was not found]) + fi + if test "x$with_whoopsie" != xcheck && test "x$HAVE_LIBWHOOPSIE" != xyes; then + AC_MSG_FAILURE( + [--with-whoopsie was given, but libwhoopsie or libwhoopsie-preferences was not found]) + fi + ] + + AC_SUBST(UNITY_CCPANEL_DIR), + [ + if test "x$with_ccpanel" != xcheck; then + AC_MSG_FAILURE( + [--with-ccpanel was given, but test for libunity-control-center failed]) + fi + ] +) + AM_CONDITIONAL([HAVE_CCPANEL], [test -n "$CCPANEL_LIBS" && test "x$with_ccpanel" != xno]) +AM_CONDITIONAL([HAVE_UNITY_CCPANEL], [test -n "$UNITY_CCPANEL_LIBS" && test "x$with_unity_ccpanel" != xno]) AM_CONDITIONAL([HAVE_WHOOPSIE], [test -n "$POLKIT_LIBS" && test -n "$LIBWHOOPSIEPREFS_LIBS"]) AC_CONFIG_FILES([ Makefile data/Makefile src/Makefile +src/gnome-control-center/Makefile +src/unity-control-center/Makefile po/Makefile.in ]) @@ -131,6 +157,12 @@ CC_ENABLE=no fi +if test -n "$UNITY_CCPANEL_LIBS" && test "x$with_unity_ccpanel" != xno; then + UNITY_CC_ENABLE=yes +else + UNITY_CC_ENABLE=no +fi + AM_CONDITIONAL([HAVE_SWITCHBOARD], [test -n "$PANTHEON_LIBS" && test "x$with_switchboard" != xno]) AM_CONDITIONAL([HAVE_DIAG], [test "x$WHOOPSIE_ENABLE" = xyes]) @@ -148,6 +180,7 @@ Optional Integration System Settings: ${CC_ENABLE} + Unity: ${UNITY_CC_ENABLE} Whoopsie: ${WHOOPSIE_ENABLE} Switchboard: ${SWITCHBOARD_ENABLE} Index: activity-log-manager-0.9.7/data/Makefile.am =================================================================== --- activity-log-manager-0.9.7.orig/data/Makefile.am 2014-02-03 11:31:13.321257014 +0000 +++ activity-log-manager-0.9.7/data/Makefile.am 2014-02-03 11:31:13.317257014 +0000 @@ -22,10 +22,12 @@ desktopdir = $(datadir)/applications +desktop_in_files = activity-log-manager.desktop.in if HAVE_CCPANEL - desktop_in_files = activity-log-manager.desktop.in gnome-activity-log-manager-panel.desktop.in -else - desktop_in_files = activity-log-manager.desktop.in + desktop_in_files += gnome-activity-log-manager-panel.desktop.in +endif +if HAVE_UNITY_CCPANEL + desktop_in_files += unity-activity-log-manager-panel.desktop.in endif if HAVE_SWITCHBOARD @@ -34,8 +36,8 @@ endif if HAVE_WHOOPSIE - gnomeccuidir = $(datadir)/gnome-control-center/ui - gnomeccui_DATA = whoopsie.ui + uidir = $(pkgdatadir) + ui_DATA = whoopsie.ui endif desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) Index: activity-log-manager-0.9.7/data/unity-activity-log-manager-panel.desktop.in =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ activity-log-manager-0.9.7/data/unity-activity-log-manager-panel.desktop.in 2014-02-03 11:31:13.317257014 +0000 @@ -0,0 +1,25 @@ +[Desktop Entry] +Version=1.0 + +_Name=Security & Privacy +_Comment=Privacy and Activity Manager + +Icon=activity-log-manager +TryExec=unity-control-center +Exec=unity-control-center activity-log-manager + +StartupNotify=true + +Type=Application +Categories=GNOME;GTK;System;Archiving;Utility;Settings;X-GNOME-PersonalSettings;X-Unity-Settings-Panel; +X-Unity-Settings-Panel=activity-log-manager + +OnlyShowIn=Unity; + +# Translators: Add whatever keywords you want in your language, separated by semicolons +# These keywords are used when searching for applications in dashes, etc. +_Keywords=privacy;activity;log;zeitgeist;diagnostics;error reports; + +X-AppInstall-Ignore=true +X-Ayatana-Desktop-Shortcuts=X-Activity-Log-Manager; + Index: activity-log-manager-0.9.7/po/POTFILES.in =================================================================== --- activity-log-manager-0.9.7.orig/po/POTFILES.in 2014-02-03 11:31:13.321257014 +0000 +++ activity-log-manager-0.9.7/po/POTFILES.in 2014-02-03 11:31:13.317257014 +0000 @@ -1,5 +1,6 @@ data/activity-log-manager.desktop.in data/gnome-activity-log-manager-panel.desktop.in +data/unity-activity-log-manager-panel.desktop.in src/activity-log-manager.vala src/alm.vala src/alm-cc.c Index: activity-log-manager-0.9.7/po/POTFILES.skip =================================================================== --- activity-log-manager-0.9.7.orig/po/POTFILES.skip 2014-02-03 11:31:13.321257014 +0000 +++ activity-log-manager-0.9.7/po/POTFILES.skip 2014-02-03 11:31:13.317257014 +0000 @@ -5,3 +5,15 @@ src/unified-privacy-applications.c src/unified-privacy-history.c src/unified-privacy.c +src/gnome-control-center/activity-log-manager.c +src/gnome-control-center/searchresults-widget.c +src/gnome-control-center/security-widget.c +src/gnome-control-center/unified-privacy-applications.c +src/gnome-control-center/unified-privacy-history.c +src/gnome-control-center/unified-privacy.c +src/unity-control-center/activity-log-manager.c +src/unity-control-center/searchresults-widget.c +src/unity-control-center/security-widget.c +src/unity-control-center/unified-privacy-applications.c +src/unity-control-center/unified-privacy-history.c +src/unity-control-center/unified-privacy.c Index: activity-log-manager-0.9.7/src/Makefile.am =================================================================== --- activity-log-manager-0.9.7.orig/src/Makefile.am 2014-02-03 11:31:13.321257014 +0000 +++ activity-log-manager-0.9.7/src/Makefile.am 2014-02-03 11:31:13.317257014 +0000 @@ -1,3 +1,5 @@ +SUBDIRS = gnome-control-center unity-control-center + AM_VALAFLAGS = \ --pkg zeitgeist-2.0 \ --pkg glib-2.0 \ @@ -11,7 +13,7 @@ SHARED_CFLAGS = \ -Wall \ -g \ - -DGNOMECC_UI_DIR=\""$(gnomeccuidir)"\" \ + -DUI_DIR=\""$(uidir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ @@ -77,27 +79,13 @@ if HAVE_DIAG AM_VALAFLAGS += \ -D DIAGNOSTIC -gnomeccuidir = $(datadir)/gnome-control-center/ui/ -endif - - -if HAVE_CCPANEL -ccpaneldir = $(libdir)/control-center-1/panels -ccpanel_LTLIBRARIES = libactivity-log-manager.la +uidir = $(pkgdatadir) endif bin_PROGRAMS = activity-log-manager activity_log_manager_CFLAGS = \ $(SHARED_CFLAGS) -libactivity_log_manager_la_CFLAGS = \ - $(SHARED_CFLAGS) \ - $(CCPANEL_CFLAGS) - -if HAVE_WHOOPSIE -libactivity_log_manager_la_CFLAGS += \ - -DGNOMECC_UI_DIR=\""$(gnomeccuidir)"\" -endif activity_log_manager_SOURCES = \ $(SHARED_SOURCES) \ @@ -109,25 +97,12 @@ diagnostics-widget.c endif -libactivity_log_manager_la_SOURCES = \ - $(SHARED_SOURCES:.vala=.c) \ - alm-cc.c - -if HAVE_WHOOPSIE -libactivity_log_manager_la_SOURCES += \ - diagnostics-widget.c -endif - activity_log_manager_LDFLAGS = \ -Wl,--export-dynamic -libactivity_log_manager_la_LDFLAGS = -module -avoid-version activity_log_manager_LDADD = \ $(SHARED_LIBS) -libactivity_log_manager_la_LIBADD = \ - $(SHARED_LIBS) \ - $(CCPANEL_LIBS) GENERATED_C_FILES = $(SHARED_SOURCES:.vala=.c) Index: activity-log-manager-0.9.7/src/alm-cc.c =================================================================== --- activity-log-manager-0.9.7.orig/src/alm-cc.c 2014-02-03 11:31:13.321257014 +0000 +++ activity-log-manager-0.9.7/src/alm-cc.c 2014-02-03 11:31:13.317257014 +0000 @@ -19,7 +19,11 @@ #include "config.h" #include #include +#if USE_UNITY +#include +#else #include +#endif extern void* alm_activity_log_manager_new (void); Index: activity-log-manager-0.9.7/src/diagnostics-widget.c =================================================================== --- activity-log-manager-0.9.7.orig/src/diagnostics-widget.c 2014-02-03 11:31:13.321257014 +0000 +++ activity-log-manager-0.9.7/src/diagnostics-widget.c 2014-02-03 11:31:13.317257014 +0000 @@ -196,7 +196,7 @@ priv->builder = gtk_builder_new (); gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE); objects = g_strsplit ("privacy_page_box", ":", -1); - gtk_builder_add_objects_from_file(priv->builder, GNOMECC_UI_DIR "/whoopsie.ui", objects, &error); + gtk_builder_add_objects_from_file(priv->builder, UI_DIR "/whoopsie.ui", objects, &error); g_strfreev (objects); if (error != NULL) { g_warning ("Could not load interface file: %s", error->message); Index: activity-log-manager-0.9.7/src/gnome-control-center/Makefile.am =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ activity-log-manager-0.9.7/src/gnome-control-center/Makefile.am 2014-02-03 11:31:13.317257014 +0000 @@ -0,0 +1,87 @@ +AM_VALAFLAGS = \ + --pkg zeitgeist-2.0 \ + --pkg glib-2.0 \ + --pkg gtk+-3.0 \ + --pkg gee-1.0 \ + --target-glib=2.26 \ + --pkg gio-unix-2.0 \ + ../config.vapi + +if HAVE_DIAG +AM_VALAFLAGS += \ + -D DIAGNOSTIC +uidir = $(pkgdatadir) +endif + +if HAVE_CCPANEL +ccpaneldir = $(libdir)/control-center-1/panels +ccpanel_LTLIBRARIES = libactivity-log-manager.la +endif + +libactivity_log_manager_la_CFLAGS = \ + -Wall \ + -g \ + -DUI_DIR=\""$(uidir)"\" \ + -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ + -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \ + -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ + -DPROGRAMNAME_LOCALEDIR=\"${PROGRAMNAME_LOCALEDIR}\" \ + -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ + -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ + $(GTK_CFLAGS) $(ZEITGEIST_CFLAGS) $(GEE_CFLAGS) $(GIO_UNIX_CFLAGS) $(POLKIT_CFLAGS) \ + $(CCPANEL_CFLAGS) + +if HAVE_WHOOPSIE +libactivity_log_manager_la_CFLAGS += \ + -DUI_DIR=\""$(uidir)"\" +endif + +searchresults-widget.vala: ../searchresults-widget.vala + cp ../searchresults-widget.vala searchresults-widget.vala +security-widget.vala: ../security-widget.vala + cp ../security-widget.vala security-widget.vala +blacklist-dbus.vala: ../blacklist-dbus.vala + cp ../blacklist-dbus.vala blacklist-dbus.vala +activity-log-manager.vala: ../activity-log-manager.vala + cp ../activity-log-manager.vala activity-log-manager.vala +unified-privacy-files.vala: ../unified-privacy-files.vala + cp ../unified-privacy-files.vala unified-privacy-files.vala +unified-privacy-applications.vala: ../unified-privacy-applications.vala + cp ../unified-privacy-applications.vala unified-privacy-applications.vala +unified-privacy-history.vala: ../unified-privacy-history.vala + cp ../unified-privacy-history.vala unified-privacy-history.vala +unified-privacy.vala: ../unified-privacy.vala + cp ../unified-privacy.vala unified-privacy.vala + +libactivity_log_manager_la_SOURCES = \ + searchresults-widget.vala \ + security-widget.vala \ + blacklist-dbus.vala \ + activity-log-manager.vala \ + unified-privacy-files.vala \ + unified-privacy-applications.vala \ + unified-privacy-history.vala \ + unified-privacy.vala \ + ../alm-cc.c + +if HAVE_WHOOPSIE +libactivity_log_manager_la_SOURCES += \ + ../diagnostics-widget.c +endif + +libactivity_log_manager_la_LDFLAGS = -module -avoid-version + +libactivity_log_manager_la_LIBADD = \ + $(GTK_LIBS) \ + $(ZEITGEIST_LIBS) \ + $(GEE_LIBS) \ + $(GIO_UNIX_LIBS) \ + $(GLIB_LIBS) \ + $(POLKIT_LIBS) \ + -lm \ + $(CCPANEL_LIBS) + +if HAVE_WHOOPSIE +libactivity_log_manager_la_LIBADD += \ + $(LIBWHOOPSIEPREFS_LIBS) +endif Index: activity-log-manager-0.9.7/src/unity-control-center/Makefile.am =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ activity-log-manager-0.9.7/src/unity-control-center/Makefile.am 2014-02-03 11:31:13.317257014 +0000 @@ -0,0 +1,89 @@ +AM_VALAFLAGS = \ + --pkg zeitgeist-2.0 \ + --pkg glib-2.0 \ + --pkg gtk+-3.0 \ + --pkg gee-1.0 \ + --target-glib=2.26 \ + --pkg gio-unix-2.0 \ + ../config.vapi + +if HAVE_DIAG +AM_VALAFLAGS += \ + -D DIAGNOSTIC +uidir = $(pkgdatadir) +endif + +if HAVE_UNITY_CCPANEL +ccpaneldir = $(libdir)/unity-control-center-1/panels +ccpanel_LTLIBRARIES = libactivity-log-manager.la +endif + +libactivity_log_manager_la_CFLAGS = \ + -Wall \ + -g \ + -DUI_DIR=\""$(uidir)"\" \ + -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ + -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \ + -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ + -DPROGRAMNAME_LOCALEDIR=\"${PROGRAMNAME_LOCALEDIR}\" \ + -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ + -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ + -DUSE_UNITY \ + $(GTK_CFLAGS) $(ZEITGEIST_CFLAGS) $(GEE_CFLAGS) $(GIO_UNIX_CFLAGS) $(POLKIT_CFLAGS) \ + $(UNITY_CCPANEL_CFLAGS) + +if HAVE_WHOOPSIE +libactivity_log_manager_la_CFLAGS += \ + -DUI_DIR=\""$(uidir)"\" +endif + +searchresults-widget.vala: ../searchresults-widget.vala + cp ../searchresults-widget.vala searchresults-widget.vala +security-widget.vala: ../security-widget.vala + cp ../security-widget.vala security-widget.vala +blacklist-dbus.vala: ../blacklist-dbus.vala + cp ../blacklist-dbus.vala blacklist-dbus.vala +activity-log-manager.vala: ../activity-log-manager.vala + cp ../activity-log-manager.vala activity-log-manager.vala +unified-privacy-files.vala: ../unified-privacy-files.vala + cp ../unified-privacy-files.vala unified-privacy-files.vala +unified-privacy-applications.vala: ../unified-privacy-applications.vala + cp ../unified-privacy-applications.vala unified-privacy-applications.vala +unified-privacy-history.vala: ../unified-privacy-history.vala + cp ../unified-privacy-history.vala unified-privacy-history.vala +unified-privacy.vala: ../unified-privacy.vala + cp ../unified-privacy.vala unified-privacy.vala + +libactivity_log_manager_la_SOURCES = \ + searchresults-widget.vala \ + security-widget.vala \ + blacklist-dbus.vala \ + activity-log-manager.vala \ + unified-privacy-files.vala \ + unified-privacy-applications.vala \ + unified-privacy-history.vala \ + unified-privacy.vala \ + ../alm-cc.c + +if HAVE_WHOOPSIE +libactivity_log_manager_la_SOURCES += \ + ../diagnostics-widget.c +endif + +libactivity_log_manager_la_LDFLAGS = -module -avoid-version + +libactivity_log_manager_la_LIBADD = \ + $(GTK_LIBS) \ + $(ZEITGEIST_LIBS) \ + $(GEE_LIBS) \ + $(GIO_UNIX_LIBS) \ + $(GLIB_LIBS) \ + $(POLKIT_LIBS) \ + -lm \ + $(UNITY_CCPANEL_LIBS) + +if HAVE_WHOOPSIE +libactivity_log_manager_la_LIBADD += \ + $(LIBWHOOPSIEPREFS_LIBS) +endif + debian/patches/series0000664000000000000000000000067112323111231012025 0ustar 02_dont_show_nonexistant_log_types.patch 03_use_libwhoopsie-preferences.patch 04_unity_control_center.patch 05_files_and_apps_description.patch 06_panel_width.patch 07_proxy_unref.patch 08_directory_icons.patch 09_security_spacing.patch 14_seconds_combo.patch 10_build-with-gee-0.8.patch 11_make_all_widgets_sensitive.patch 12_hide_lock_unlock_button.patch 13_hide_automatic_reports.patch 15_check-bus-name-owner 16_fix_links_in_ucc.patch debian/patches/13_hide_automatic_reports.patch0000664000000000000000000000372612323111231016675 0ustar Description: whoopsie doesn't implement this feature; hide the UI for it. Author: Iain Lane Index: b/data/whoopsie.ui =================================================================== --- a/data/whoopsie.ui +++ b/data/whoopsie.ui @@ -165,24 +165,6 @@ vertical 3 - - Send a report automatically if a problem prevents login - False - False - False - False - False - False - 0 - True - - - False - True - 0 - - - True False debian/patches/01_really_hide_automatic_reports.patch0000664000000000000000000000427212323111231020237 0ustar Description: Don't show "Send Reports Automatically" since that feature isn't implemented yet Bug: https://bugs.launchpad.net/activity-log-manager/+bug/1192777 Index: activity-log-manager-0.9.6/src/diagnostics/whoopsie.ui =================================================================== --- activity-log-manager-0.9.6.orig/src/diagnostics/whoopsie.ui 2013-07-03 22:00:45.000000000 -0400 +++ activity-log-manager-0.9.6/src/diagnostics/whoopsie.ui 2013-07-04 12:06:58.517768871 -0400 @@ -162,24 +162,6 @@ vertical 3 - - Send a report automatically if a problem prevents login - False - False - False - False - False - False - 0 - True - - - False - True - 0 - - - True False debian/patches/06_panel_width.patch0000664000000000000000000000242112323111231014427 0ustar === modified file 'src/unified-privacy.vala' Index: activity-log-manager-0.9.7/src/unified-privacy.vala =================================================================== --- activity-log-manager-0.9.7.orig/src/unified-privacy.vala 2014-02-03 10:17:10.685362695 +0000 +++ activity-log-manager-0.9.7/src/unified-privacy.vala 2014-02-03 10:38:42.029331976 +0000 @@ -175,6 +175,7 @@ label.set_line_wrap(true); label.set_line_wrap_mode(Pango.WrapMode.WORD); label.set_alignment(0, 0.5f); + label.set_max_width_chars(60); this.pack_start(label, false); record_button = new Switch(); @@ -249,7 +250,7 @@ al.add (checkbox_label); var checkbox_vbox = new Box(Orientation.VERTICAL, 0); - checkbox_vbox.pack_start (al, false); + checkbox_vbox.pack_start (al, false, false, 5); checkbox_vbox.pack_start (checkbox_hbox, true); //Exception List @@ -327,8 +328,8 @@ exception_vbox.pack_start(exception_toolbar, false, false); - var general_hbox = new Box(Orientation.HORIZONTAL, 0); - general_hbox.pack_start(checkbox_vbox, true); + var general_hbox = new Box(Orientation.HORIZONTAL, 5); + general_hbox.pack_start(checkbox_vbox, false); general_hbox.pack_start(exception_vbox, true); this.pack_start(general_hbox, true); debian/patches/05_files_and_apps_description.patch0000664000000000000000000000222412323111231017503 0ustar Description: Set descriptive text in Files and Applications tab to match design in https://wiki.ubuntu.com/SecurityAndPrivacySettings#files Bug: https://bugs.launchpad.net/bugs/1263123 === modified file 'src/unified-privacy.vala' Index: activity-log-manager-0.9.7/src/unified-privacy.vala =================================================================== --- activity-log-manager-0.9.7.orig/src/unified-privacy.vala 2014-02-03 11:31:16.689256933 +0000 +++ activity-log-manager-0.9.7/src/unified-privacy.vala 2014-02-03 11:31:16.685256933 +0000 @@ -169,7 +169,7 @@ private void setup_ui() { this.set_border_width(12); - string text = _("This Operating System keeps track of Files and Applications you've used to provide extra functionality. If other people can see or access your user account, you may wish to limit which items are recorded."); + string text = _("Files and applications you’ve used recently can be shown in the Dash and elsewhere. If other people can see or access your user account, you may wish to limit which items are recorded."); var label = new Label(""); label.set_markup("%s".printf(text)); label.set_line_wrap(true); debian/patches/09_security_spacing.patch0000664000000000000000000000066212323111231015514 0ustar === modified file 'src/security-widget.vala' --- old/src/security-widget.vala 2013-07-09 01:34:49 +0000 +++ new/src/security-widget.vala 2014-02-03 16:37:12 +0000 @@ -63,8 +63,6 @@ var grid = new Grid(); grid.set_halign(Align.START); grid.set_valign(Align.START); - grid.set_margin_top(25); - grid.set_margin_left(25); grid.set_column_spacing(25); grid.set_row_spacing(5); grid.set_row_homogeneous(true); debian/patches/03_use_libwhoopsie-preferences.patch0000664000000000000000000047163212323111231017643 0ustar === modified file 'configure.ac' Index: b/configure.ac =================================================================== --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,7 @@ PKG_CHECK_MODULES(GEE, gee-1.0, [HAVE_GEE=yes]) PKG_CHECK_MODULES(GIO_UNIX, gio-unix-2.0, [HAVE_GIO_UNIX=yes]) PKG_CHECK_MODULES(POLKIT, polkit-gobject-1, [HAVE_POLKIT=yes], [HAVE_POLKIT=no]) -PKG_CHECK_MODULES(LIBWHOOPSIE, libwhoopsie, [HAVE_LIBWHOOPSIE=yes], [HAVE_LIBWHOOPSIE=no]) +PKG_CHECK_MODULES(LIBWHOOPSIEPREFS, libwhoopsie-preferences, [HAVE_LIBWHOOPSIE=yes], [HAVE_LIBWHOOPSIE=no]) PKG_CHECK_MODULES(PANTHEON, pantheon, [HAVE_PANTHEON=yes], [HAVE_PANTHEON=no]) PKG_CHECK_MODULES(GLIB, glib-2.0 gobject-2.0) @@ -89,7 +89,7 @@ fi if test "x$with_whoopsie" != xcheck && test "x$HAVE_LIBWHOOPSIE" != xyes; then AC_MSG_FAILURE( - [--with-whoopsie was given, but libwhoopsie was not found]) + [--with-whoopsie was given, but libwhoopsie or libwhoopsie-preferences was not found]) fi ] @@ -103,19 +103,15 @@ ) AM_CONDITIONAL([HAVE_CCPANEL], [test -n "$CCPANEL_LIBS" && test "x$with_ccpanel" != xno]) - -AM_CONDITIONAL([HAVE_WHOOPSIE], [test -n "$POLKIT_LIBS" && test -n "$LIBWHOOPSIE_LIBS"]) - +AM_CONDITIONAL([HAVE_WHOOPSIE], [test -n "$POLKIT_LIBS" && test -n "$LIBWHOOPSIEPREFS_LIBS"]) AC_CONFIG_FILES([ Makefile data/Makefile src/Makefile -src/diagnostics/Makefile po/Makefile.in ]) - if test "x$with_whoopsie" != xno && test "x$HAVE_POLKIT" != xno && test "x$HAVE_LIBWHOOPSIE" != xno; then AC_DEFINE([HAVE_WHOOPSIE], 1, [Enable Whoopsie]) WHOOPSIE_ENABLE=yes Index: b/data/Makefile.am =================================================================== --- a/data/Makefile.am +++ b/data/Makefile.am @@ -33,10 +33,15 @@ switchboard_DATA = alm-switchboard.plug endif +if HAVE_WHOOPSIE + gnomeccuidir = $(datadir)/gnome-control-center/ui + gnomeccui_DATA = whoopsie.ui +endif + desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) @INTLTOOL_DESKTOP_RULE@ -EXTRA_DIST = activity-log-manager.desktop.in gnome-activity-log-manager-panel.desktop.in alm-switchboard.plug +EXTRA_DIST = activity-log-manager.desktop.in gnome-activity-log-manager-panel.desktop.in alm-switchboard.plug whoopsie.ui CLEANFILES = activity-log-manager.desktop gnome-activity-log-manager-panel.desktop check: $(desktop_DATA) Index: b/po/POTFILES.in =================================================================== --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -9,5 +9,4 @@ src/unified-privacy-applications.vala src/unified-privacy-history.vala src/unified-privacy.vala -src/diagnostics/com.ubuntu.whoopsiepreferences.policy.in -[type: gettext/glade]src/diagnostics/whoopsie.ui +[type: gettext/glade]data/whoopsie.ui Index: b/src/Makefile.am =================================================================== --- a/src/Makefile.am +++ b/src/Makefile.am @@ -42,6 +42,11 @@ $(POLKIT_LIBS) \ -lm +if HAVE_WHOOPSIE +SHARED_LIBS += \ + $(LIBWHOOPSIEPREFS_LIBS) +endif + alm_switchboard_SOURCES = \ $(SHARED_SOURCES) \ alm-plug.vala \ @@ -49,8 +54,7 @@ if HAVE_WHOOPSIE alm_switchboard_SOURCES += \ - diagnostics-widget.c \ - diagnostics/whoopsie-generated.c + diagnostics-widget.c endif if HAVE_SWITCHBOARD @@ -74,7 +78,6 @@ AM_VALAFLAGS += \ -D DIAGNOSTIC gnomeccuidir = $(datadir)/gnome-control-center/ui/ -SUBDIRS = diagnostics endif @@ -103,8 +106,7 @@ if HAVE_WHOOPSIE activity_log_manager_SOURCES += \ - diagnostics-widget.c \ - diagnostics/whoopsie-generated.c + diagnostics-widget.c endif libactivity_log_manager_la_SOURCES = \ @@ -113,8 +115,7 @@ if HAVE_WHOOPSIE libactivity_log_manager_la_SOURCES += \ - diagnostics-widget.c \ - diagnostics/whoopsie-generated.c + diagnostics-widget.c endif @@ -128,10 +129,6 @@ $(SHARED_LIBS) \ $(CCPANEL_LIBS) -if HAVE_WHOOPSIE -libactivity_log_manager_la_LIBADD += \ - $(POLKIT_LIBS) -endif GENERATED_C_FILES = $(SHARED_SOURCES:.vala=.c) GENERATED_O_FILES = $(SHARED_SOURCES:.vala=.o) Index: b/src/diagnostics-widget.c =================================================================== --- a/src/diagnostics-widget.c +++ b/src/diagnostics-widget.c @@ -6,7 +6,7 @@ #define _GNU_SOURCE #include -#include "diagnostics/whoopsie-generated.h" +#include "whoopsie-preferences/libwhoopsie-preferences.h" static WhoopsiePreferences* proxy = NULL; @@ -191,10 +191,13 @@ GtkWidget* show_previous_reports = NULL; WhoopsieDaisyPreferencesPrivate* priv; priv = self->priv = WHOOPSIE_DAISY_PREFERENCES_PRIVATE (self); + gchar **objects; priv->builder = gtk_builder_new (); gtk_builder_set_translation_domain (priv->builder, GETTEXT_PACKAGE); - gtk_builder_add_from_file(priv->builder, GNOMECC_UI_DIR "/whoopsie.ui", &error); + objects = g_strsplit ("privacy_page_box", ":", -1); + gtk_builder_add_objects_from_file(priv->builder, GNOMECC_UI_DIR "/whoopsie.ui", objects, &error); + g_strfreev (objects); if (error != NULL) { g_warning ("Could not load interface file: %s", error->message); g_error_free (error); @@ -214,7 +217,7 @@ show_previous_reports = GTK_WIDGET ( gtk_builder_get_object (priv->builder, "show_previous_reports")); - gtk_widget_reparent (privacy_page, (GtkWidget *) self); + gtk_box_pack_start (GTK_BOX (self), privacy_page, TRUE, TRUE, 0); g_object_set (self, "valign", GTK_ALIGN_START, NULL); priv->permission = polkit_permission_new_sync (POL_PATH, NULL, NULL, &error); Index: b/src/diagnostics/Makefile.am =================================================================== --- a/src/diagnostics/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -if HAVE_CCPANEL -ccpaneldir = $(CCPANEL_DIR) -bin_PROGRAMS = whoopsie-preferences -endif - -policykitdir = $(datadir)/polkit-1/actions/ -dbussystemdir = $(sysconfdir)/dbus-1/system.d/ -dbusservicedir = $(datadir)/dbus-1/system-services/ -gnomeccuidir = $(datadir)/gnome-control-center/ui/ - -whoopsie_preferences_CFLAGS = \ - -Wall \ - -g \ - $(POLKIT_CFLAGS) $(GIO_UNIX_CFLAGS) \ - $(LIBWHOOPSIE_CFLAGS) - -whoopsie_preferences_SOURCES = \ - whoopsie-generated.c whoopsie-generated.h whoopsie-preferences.c - -whoopsie_preferences_LDADD = \ - $(POLKIT_LIBS) \ - $(GIO_UNIX_LIBS) \ - $(LIBWHOOPSIE_LIBS) - -policykit_in_files = com.ubuntu.whoopsiepreferences.policy.in - -EXTRA_DIST = \ - whoopsie-preferences.xml \ - com.ubuntu.WhoopsiePreferences.service \ - com.ubuntu.WhoopsiePreferences.conf \ - $(policykit_in_files) \ - whoopsie.ui - -gnomeccui_DATA = \ - whoopsie.ui -policykit_DATA = \ - $(policykit_in_files:.policy.in=.policy) -dbussystem_DATA = \ - com.ubuntu.WhoopsiePreferences.conf -dbusservice_DATA = \ - com.ubuntu.WhoopsiePreferences.service - -whoopsie-generated.c: whoopsie-preferences.xml - gdbus-codegen --interface-prefix com.ubuntu. \ - --generate-c-code whoopsie-generated \ - $< - -CLEANFILES = whoopsie-generated.[ch] \ - $(policykit_DATA) -@INTLTOOL_POLICY_RULE@ Index: b/src/diagnostics/com.ubuntu.WhoopsiePreferences.conf =================================================================== --- a/src/diagnostics/com.ubuntu.WhoopsiePreferences.conf +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - Index: b/src/diagnostics/com.ubuntu.WhoopsiePreferences.service =================================================================== --- a/src/diagnostics/com.ubuntu.WhoopsiePreferences.service +++ /dev/null @@ -1,4 +0,0 @@ -[D-BUS Service] -Name=com.ubuntu.WhoopsiePreferences -Exec=/usr/bin/whoopsie-preferences -User=root Index: b/src/diagnostics/com.ubuntu.whoopsiepreferences.policy.in =================================================================== --- a/src/diagnostics/com.ubuntu.whoopsiepreferences.policy.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - Ubuntu crash reporting - https://launchpad.net/whoopsie - stock_lock - - <_description>Privacy settings - <_message>To change your privacy settings you need to authenticate. - - auth_admin - auth_admin - auth_admin_keep - - - Index: b/src/diagnostics/whoopsie-preferences.c =================================================================== --- a/src/diagnostics/whoopsie-preferences.c +++ /dev/null @@ -1,363 +0,0 @@ -/* whoopsie - * - * Copyright © 2011 Canonical Ltd. - * Author: Evan Dandrea - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include -#include - -#include "whoopsie-generated.h" - -#define CONFIG_PATH "/etc/default/whoopsie" - -static GMainLoop* loop = NULL; -static guint loop_shutdown = 0; -static GKeyFile* key_file = NULL; -static PolkitAuthority* authority = NULL; - -/* Eventually, it might make sense to move to gsettings with the dconf - * backend, once it gains PolicyKit support, rather than have a program just - * to expose an interface to a small configuration file over DBus/PolicyKit. - * */ - -/* Once upstart has an interface for disabiling jobs via initctl, we wont need - * a configuration file anymore */ - -gboolean -whoopsie_preferences_load_configuration (void) -{ - char* data; - gsize data_size; - gboolean ret = TRUE; - GError* error = NULL; - - if (g_key_file_load_from_file (key_file, CONFIG_PATH, - G_KEY_FILE_KEEP_COMMENTS, NULL)) { - return TRUE; - } - - g_key_file_set_boolean (key_file, "General", "report_crashes", TRUE); - g_key_file_set_boolean (key_file, "General", "report_metrics", TRUE); - data = g_key_file_to_data (key_file, &data_size, &error); - if (error) { - g_print ("Could not process configuration: %s\n", error->message); - ret = FALSE; - goto out; - } - if (!g_file_set_contents (CONFIG_PATH, data, data_size, &error)) { - g_print ("Could not write configuration: %s\n", error->message); - ret = FALSE; - goto out; - } - -out: - if (data) - g_free (data); - if (error) - g_error_free (error); - return ret; -} - -static void -whoopsie_preferences_dbus_notify (WhoopsiePreferences* interface) -{ - GError* error = NULL; - gboolean report_crashes = FALSE; - gboolean report_metrics = FALSE; - - report_crashes = g_key_file_get_boolean (key_file, "General", - "report_crashes", &error); - if (error) { - g_warning ("Could not get crashes: %s", error->message); - g_error_free (error); - } - - error = NULL; - report_metrics = g_key_file_get_boolean (key_file, "General", - "report_metrics", &error); - if (error) { - g_warning ("Could not get metrics: %s", error->message); - g_error_free (error); - } - whoopsie_preferences_set_report_crashes (interface, report_crashes); - whoopsie_preferences_set_report_metrics (interface, report_metrics); -} - -static void -whoopsie_preferences_file_changed (GFileMonitor *monitor, GFile *file, - GFile *other_file, - GFileMonitorEvent event_type, - gpointer user_data) -{ - if (event_type == G_FILE_MONITOR_EVENT_CHANGED) { - whoopsie_preferences_load_configuration (); - whoopsie_preferences_dbus_notify (user_data); - } -} - -void -whoopsie_preferences_load (WhoopsiePreferences* interface) -{ - GError* error = NULL; - GFile* fp = NULL; - GFileMonitor* file_monitor = NULL; - - fp = g_file_new_for_path (CONFIG_PATH); - file_monitor = g_file_monitor_file (fp, G_FILE_MONITOR_NONE, - NULL, &error); - g_signal_connect (file_monitor, "changed", - G_CALLBACK (whoopsie_preferences_file_changed), - interface); - if (error) { - g_print ("Could not set up file monitor: %s\n", error->message); - g_error_free (error); - } - g_object_unref (fp); - - key_file = g_key_file_new (); - whoopsie_preferences_load_configuration (); -} - -void -whoopsie_preferences_notify_upstart (gboolean run_whoopsie) -{ - GError* error = NULL; - char* command[] = { "/sbin/initctl", run_whoopsie ? "start" : "stop", "whoopsie", NULL }; - if (!g_spawn_sync (NULL, command, NULL, 0, NULL, NULL, NULL, NULL, NULL, &error)) { - g_print ("Could not run initctl: %s\n", error->message); - } -} - -gboolean -whoopsie_preferences_changed (WhoopsiePreferences* object, GParamSpec* pspec, - gpointer user_data) -{ - WhoopsiePreferencesIface* iface; - gboolean saved_value, new_value; - GError* error = NULL; - char* data; - gsize data_size; - gboolean crashes = !g_strcmp0(user_data, "report_crashes"); - - if (loop_shutdown) { - g_source_remove (loop_shutdown); - loop_shutdown = 0; - } - loop_shutdown = g_timeout_add_seconds (60, (GSourceFunc) g_main_loop_quit, - loop); - - iface = WHOOPSIE_PREFERENCES_GET_IFACE (object); - saved_value = g_key_file_get_boolean (key_file, "General", user_data, - &error); - if (error) { - g_print ("Could not process configuration: %s\n", error->message); - } - if (crashes) - new_value = iface->get_report_crashes (object); - else - new_value = iface->get_report_metrics (object); - - if (error || (saved_value != new_value)) { - if (error) - g_error_free (error); - g_key_file_set_boolean (key_file, "General", user_data, new_value); - data = g_key_file_to_data (key_file, &data_size, &error); - if (error) { - g_print ("Could not process configuration: %s\n", error->message); - return FALSE; - } - if (!g_file_set_contents (CONFIG_PATH, data, data_size, &error)) { - g_print ("Could not write configuration: %s\n", error->message); - return FALSE; - } - } - if (crashes) - whoopsie_preferences_notify_upstart (new_value); - - return TRUE; -} - -static gboolean -whoopsie_preferences_on_set_report_crashes (WhoopsiePreferences* object, - GDBusMethodInvocation* invocation, - gboolean report, - gpointer user_data) -{ - whoopsie_preferences_set_report_crashes (object, report); - whoopsie_preferences_complete_set_report_crashes (object, invocation); - return TRUE; -} - -static gboolean -whoopsie_preferences_on_set_report_metrics (WhoopsiePreferences* object, - GDBusMethodInvocation* invocation, - gboolean report, - gpointer user_data) -{ - whoopsie_preferences_set_report_metrics (object, report); - whoopsie_preferences_complete_set_report_metrics (object, invocation); - return TRUE; -} - -static gboolean -whoopsie_preferences_on_get_identifier (WhoopsiePreferences* object, - GDBusMethodInvocation* invocation) -{ - char* identifier = NULL; - GError* error = NULL; - - whoopsie_identifier_generate (&identifier, &error); - if (error) { - g_printerr ("Error getting identifier: %s\n", error->message); - g_error_free (error); - } - whoopsie_preferences_complete_get_identifier (object, invocation, identifier); - return TRUE; -} - -static gboolean -whoopsie_preferences_authorize_method (GDBusInterfaceSkeleton* interface, - GDBusMethodInvocation* invocation, - gpointer user_data) -{ - PolkitSubject* subject = NULL; - PolkitAuthorizationResult* result = NULL; - GError* error = NULL; - const char* sender = NULL; - gboolean ret = FALSE; - - sender = g_dbus_method_invocation_get_sender (invocation); - subject = polkit_system_bus_name_new (sender); - result = polkit_authority_check_authorization_sync (authority, subject, - "com.ubuntu.whoopsiepreferences.change", - NULL, - POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE, - NULL, &error); - if (result == NULL) { - g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, - G_DBUS_ERROR_AUTH_FAILED, "Could not authorize: %s", - error->message); - g_error_free (error); - goto out; - } - if (!polkit_authorization_result_get_is_authorized (result)) { - g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, - G_DBUS_ERROR_AUTH_FAILED, "Not authorized."); - goto out; - } - ret = TRUE; - out: - if (result != NULL) - g_object_unref (result); - g_object_unref (subject); - return ret; -} - -static void -on_bus_acquired (GDBusConnection* connection, const gchar* name, - gpointer user_data) -{ - WhoopsiePreferences* interface; - GError* error = NULL; - - interface = whoopsie_preferences_skeleton_new (); - if (!g_dbus_interface_skeleton_export ( - G_DBUS_INTERFACE_SKELETON (interface), - connection, - "/com/ubuntu/WhoopsiePreferences", &error)) { - - g_print ("Could not export path: %s\n", error->message); - g_error_free (error); - g_main_loop_quit (loop); - return; - } - - authority = polkit_authority_get_sync (NULL, &error); - if (authority == NULL) { - g_print ("Could not get authority: %s\n", error->message); - g_error_free (error); - g_main_loop_quit (loop); - return; - } - loop_shutdown = g_timeout_add_seconds (60, (GSourceFunc) g_main_loop_quit, - loop); - - g_signal_connect (interface, "notify::report-crashes", - G_CALLBACK (whoopsie_preferences_changed), - "report_crashes"); - g_signal_connect (interface, "notify::report-metrics", - G_CALLBACK (whoopsie_preferences_changed), - "report_metrics"); - g_signal_connect (interface, "handle-set-report-crashes", - G_CALLBACK (whoopsie_preferences_on_set_report_crashes), - NULL); - g_signal_connect (interface, "handle-set-report-metrics", - G_CALLBACK (whoopsie_preferences_on_set_report_metrics), - NULL); - g_signal_connect (interface, "handle-get-identifier", - G_CALLBACK (whoopsie_preferences_on_get_identifier), - NULL); - g_signal_connect (interface, "g-authorize-method", G_CALLBACK - (whoopsie_preferences_authorize_method), authority); - - whoopsie_preferences_load (interface); - whoopsie_preferences_dbus_notify (interface); -} - -static void -on_name_acquired (GDBusConnection* connection, const gchar* name, - gpointer user_data) -{ - g_print ("Acquired the name: %s\n", name); -} - -static void -on_name_lost (GDBusConnection* connection, const gchar* name, - gpointer user_data) -{ - g_print ("Lost the name: %s\n", name); -} - -int -main (int argc, char** argv) -{ - guint owner_id; - - if (getuid () != 0) { - g_print ("This program must be run as root.\n"); - return 1; - } - - g_type_init(); - - owner_id = g_bus_own_name (G_BUS_TYPE_SYSTEM, - "com.ubuntu.WhoopsiePreferences", - G_BUS_NAME_OWNER_FLAGS_NONE, - on_bus_acquired, - on_name_acquired, - on_name_lost, - NULL, NULL); - - loop = g_main_loop_new (NULL, FALSE); - g_main_loop_run (loop); - g_bus_unown_name (owner_id); - g_main_loop_unref (loop); - if (key_file) - g_key_file_free (key_file); - return 0; -} Index: b/src/diagnostics/whoopsie-preferences.xml =================================================================== --- a/src/diagnostics/whoopsie-preferences.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - Index: b/data/whoopsie.ui =================================================================== --- /dev/null +++ b/data/whoopsie.ui @@ -0,0 +1,287 @@ + + + + + False + False + + + True + False + 12 + vertical + 12 + + + True + False + vertical + 12 + + + True + False + 0 + Ubuntu can collect anonymous information that helps developers improve it. All information collected is covered by our privacy policy. + 60 + True + + + False + True + 0 + + + + + True + False + 0 + 0 + + + Privacy Policy + False + True + True + True + False + + + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + vertical + 12 + + + True + False + + + True + False + People using this computer can: + + + False + True + 0 + + + + + True + False + 1 + 0 + + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + vertical + 3 + + + Send error reports to Canonical + False + True + True + False + False + 0 + True + + + False + True + 0 + + + + + True + False + 24 + + + True + False + vertical + 12 + + + True + False + 0 + <small>Error reports include information about what a program was doing when it failed. You always have the choice to send or cancel an error report.</small> + True + 60 + True + + + False + True + 0 + + + + + True + False + vertical + 3 + + + Send a report automatically if a problem prevents login + False + False + False + False + False + False + 0 + True + + + False + True + 0 + + + + + True + False + 0 + 0 + + + Show Previous Reports + False + True + True + True + False + + + + + False + True + 1 + + + + + False + True + 1 + + + + + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + vertical + 3 + + + Send occasional system information to Canonical + False + True + True + False + False + 0 + True + + + False + True + 0 + + + + + True + False + 0 + 24 + <small>This includes things like how many programs are running, how much disk space the computer has, and what devices are connected.</small> + True + 60 + True + + + False + True + 1 + + + + + False + True + 2 + + + + + False + True + 1 + + + + + + Index: b/src/diagnostics/Makefile.in =================================================================== --- a/src/diagnostics/Makefile.in +++ /dev/null @@ -1,874 +0,0 @@ -# Makefile.in generated by automake 1.13.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2013 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@HAVE_CCPANEL_TRUE@bin_PROGRAMS = whoopsie-preferences$(EXEEXT) -subdir = src/diagnostics -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/depcomp -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dbusservicedir)" \ - "$(DESTDIR)$(dbussystemdir)" "$(DESTDIR)$(gnomeccuidir)" \ - "$(DESTDIR)$(policykitdir)" -PROGRAMS = $(bin_PROGRAMS) -am_whoopsie_preferences_OBJECTS = \ - whoopsie_preferences-whoopsie-generated.$(OBJEXT) \ - whoopsie_preferences-whoopsie-preferences.$(OBJEXT) -whoopsie_preferences_OBJECTS = $(am_whoopsie_preferences_OBJECTS) -am__DEPENDENCIES_1 = -whoopsie_preferences_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = -whoopsie_preferences_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(whoopsie_preferences_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(whoopsie_preferences_SOURCES) -DIST_SOURCES = $(whoopsie_preferences_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -DATA = $(dbusservice_DATA) $(dbussystem_DATA) $(gnomeccui_DATA) \ - $(policykit_DATA) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALL_LINGUAS = @ALL_LINGUAS@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CCPANEL_CFLAGS = @CCPANEL_CFLAGS@ -CCPANEL_DIR = @CCPANEL_DIR@ -CCPANEL_LIBS = @CCPANEL_LIBS@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GEE_CFLAGS = @GEE_CFLAGS@ -GEE_LIBS = @GEE_LIBS@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GIO_UNIX_CFLAGS = @GIO_UNIX_CFLAGS@ -GIO_UNIX_LIBS = @GIO_UNIX_LIBS@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GREP = @GREP@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLLIBS = @INTLLIBS@ -INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -INTLTOOL_MERGE = @INTLTOOL_MERGE@ -INTLTOOL_PERL = @INTLTOOL_PERL@ -INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ -INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ -INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ -INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIBWHOOPSIE_CFLAGS = @LIBWHOOPSIE_CFLAGS@ -LIBWHOOPSIE_LIBS = @LIBWHOOPSIE_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ -MSGFMT_OPTS = @MSGFMT_OPTS@ -MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PANTHEON_CFLAGS = @PANTHEON_CFLAGS@ -PANTHEON_LIBS = @PANTHEON_LIBS@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -POFILES = @POFILES@ -POLKIT_CFLAGS = @POLKIT_CFLAGS@ -POLKIT_LIBS = @POLKIT_LIBS@ -POSUB = @POSUB@ -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ -PROGRAMNAME_LOCALEDIR = @PROGRAMNAME_LOCALEDIR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -USE_NLS = @USE_NLS@ -VALAC = @VALAC@ -VERSION = @VERSION@ -XGETTEXT = @XGETTEXT@ -ZEITGEIST_CFLAGS = @ZEITGEIST_CFLAGS@ -ZEITGEIST_LIBS = @ZEITGEIST_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -intltool__v_merge_options_ = @intltool__v_merge_options_@ -intltool__v_merge_options_0 = @intltool__v_merge_options_0@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -@HAVE_CCPANEL_TRUE@ccpaneldir = $(CCPANEL_DIR) -policykitdir = $(datadir)/polkit-1/actions/ -dbussystemdir = $(sysconfdir)/dbus-1/system.d/ -dbusservicedir = $(datadir)/dbus-1/system-services/ -gnomeccuidir = $(datadir)/gnome-control-center/ui/ -whoopsie_preferences_CFLAGS = \ - -Wall \ - -g \ - $(POLKIT_CFLAGS) $(GIO_UNIX_CFLAGS) \ - $(LIBWHOOPSIE_CFLAGS) - -whoopsie_preferences_SOURCES = \ - whoopsie-generated.c whoopsie-generated.h whoopsie-preferences.c - -whoopsie_preferences_LDADD = \ - $(POLKIT_LIBS) \ - $(GIO_UNIX_LIBS) \ - $(LIBWHOOPSIE_LIBS) - -policykit_in_files = com.ubuntu.whoopsiepreferences.policy.in -EXTRA_DIST = \ - whoopsie-preferences.xml \ - com.ubuntu.WhoopsiePreferences.service \ - com.ubuntu.WhoopsiePreferences.conf \ - $(policykit_in_files) \ - whoopsie.ui - -gnomeccui_DATA = \ - whoopsie.ui - -policykit_DATA = \ - $(policykit_in_files:.policy.in=.policy) - -dbussystem_DATA = \ - com.ubuntu.WhoopsiePreferences.conf - -dbusservice_DATA = \ - com.ubuntu.WhoopsiePreferences.service - -CLEANFILES = whoopsie-generated.[ch] \ - $(policykit_DATA) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/diagnostics/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/diagnostics/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p \ - || test -f $$p1 \ - ; then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' \ - -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -whoopsie-preferences$(EXEEXT): $(whoopsie_preferences_OBJECTS) $(whoopsie_preferences_DEPENDENCIES) $(EXTRA_whoopsie_preferences_DEPENDENCIES) - @rm -f whoopsie-preferences$(EXEEXT) - $(AM_V_CCLD)$(whoopsie_preferences_LINK) $(whoopsie_preferences_OBJECTS) $(whoopsie_preferences_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/whoopsie_preferences-whoopsie-generated.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/whoopsie_preferences-whoopsie-preferences.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -whoopsie_preferences-whoopsie-generated.o: whoopsie-generated.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(whoopsie_preferences_CFLAGS) $(CFLAGS) -MT whoopsie_preferences-whoopsie-generated.o -MD -MP -MF $(DEPDIR)/whoopsie_preferences-whoopsie-generated.Tpo -c -o whoopsie_preferences-whoopsie-generated.o `test -f 'whoopsie-generated.c' || echo '$(srcdir)/'`whoopsie-generated.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/whoopsie_preferences-whoopsie-generated.Tpo $(DEPDIR)/whoopsie_preferences-whoopsie-generated.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='whoopsie-generated.c' object='whoopsie_preferences-whoopsie-generated.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(whoopsie_preferences_CFLAGS) $(CFLAGS) -c -o whoopsie_preferences-whoopsie-generated.o `test -f 'whoopsie-generated.c' || echo '$(srcdir)/'`whoopsie-generated.c - -whoopsie_preferences-whoopsie-generated.obj: whoopsie-generated.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(whoopsie_preferences_CFLAGS) $(CFLAGS) -MT whoopsie_preferences-whoopsie-generated.obj -MD -MP -MF $(DEPDIR)/whoopsie_preferences-whoopsie-generated.Tpo -c -o whoopsie_preferences-whoopsie-generated.obj `if test -f 'whoopsie-generated.c'; then $(CYGPATH_W) 'whoopsie-generated.c'; else $(CYGPATH_W) '$(srcdir)/whoopsie-generated.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/whoopsie_preferences-whoopsie-generated.Tpo $(DEPDIR)/whoopsie_preferences-whoopsie-generated.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='whoopsie-generated.c' object='whoopsie_preferences-whoopsie-generated.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(whoopsie_preferences_CFLAGS) $(CFLAGS) -c -o whoopsie_preferences-whoopsie-generated.obj `if test -f 'whoopsie-generated.c'; then $(CYGPATH_W) 'whoopsie-generated.c'; else $(CYGPATH_W) '$(srcdir)/whoopsie-generated.c'; fi` - -whoopsie_preferences-whoopsie-preferences.o: whoopsie-preferences.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(whoopsie_preferences_CFLAGS) $(CFLAGS) -MT whoopsie_preferences-whoopsie-preferences.o -MD -MP -MF $(DEPDIR)/whoopsie_preferences-whoopsie-preferences.Tpo -c -o whoopsie_preferences-whoopsie-preferences.o `test -f 'whoopsie-preferences.c' || echo '$(srcdir)/'`whoopsie-preferences.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/whoopsie_preferences-whoopsie-preferences.Tpo $(DEPDIR)/whoopsie_preferences-whoopsie-preferences.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='whoopsie-preferences.c' object='whoopsie_preferences-whoopsie-preferences.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(whoopsie_preferences_CFLAGS) $(CFLAGS) -c -o whoopsie_preferences-whoopsie-preferences.o `test -f 'whoopsie-preferences.c' || echo '$(srcdir)/'`whoopsie-preferences.c - -whoopsie_preferences-whoopsie-preferences.obj: whoopsie-preferences.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(whoopsie_preferences_CFLAGS) $(CFLAGS) -MT whoopsie_preferences-whoopsie-preferences.obj -MD -MP -MF $(DEPDIR)/whoopsie_preferences-whoopsie-preferences.Tpo -c -o whoopsie_preferences-whoopsie-preferences.obj `if test -f 'whoopsie-preferences.c'; then $(CYGPATH_W) 'whoopsie-preferences.c'; else $(CYGPATH_W) '$(srcdir)/whoopsie-preferences.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/whoopsie_preferences-whoopsie-preferences.Tpo $(DEPDIR)/whoopsie_preferences-whoopsie-preferences.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='whoopsie-preferences.c' object='whoopsie_preferences-whoopsie-preferences.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(whoopsie_preferences_CFLAGS) $(CFLAGS) -c -o whoopsie_preferences-whoopsie-preferences.obj `if test -f 'whoopsie-preferences.c'; then $(CYGPATH_W) 'whoopsie-preferences.c'; else $(CYGPATH_W) '$(srcdir)/whoopsie-preferences.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-dbusserviceDATA: $(dbusservice_DATA) - @$(NORMAL_INSTALL) - @list='$(dbusservice_DATA)'; test -n "$(dbusservicedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(dbusservicedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(dbusservicedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dbusservicedir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(dbusservicedir)" || exit $$?; \ - done - -uninstall-dbusserviceDATA: - @$(NORMAL_UNINSTALL) - @list='$(dbusservice_DATA)'; test -n "$(dbusservicedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(dbusservicedir)'; $(am__uninstall_files_from_dir) -install-dbussystemDATA: $(dbussystem_DATA) - @$(NORMAL_INSTALL) - @list='$(dbussystem_DATA)'; test -n "$(dbussystemdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(dbussystemdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(dbussystemdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dbussystemdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(dbussystemdir)" || exit $$?; \ - done - -uninstall-dbussystemDATA: - @$(NORMAL_UNINSTALL) - @list='$(dbussystem_DATA)'; test -n "$(dbussystemdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(dbussystemdir)'; $(am__uninstall_files_from_dir) -install-gnomeccuiDATA: $(gnomeccui_DATA) - @$(NORMAL_INSTALL) - @list='$(gnomeccui_DATA)'; test -n "$(gnomeccuidir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(gnomeccuidir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(gnomeccuidir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gnomeccuidir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(gnomeccuidir)" || exit $$?; \ - done - -uninstall-gnomeccuiDATA: - @$(NORMAL_UNINSTALL) - @list='$(gnomeccui_DATA)'; test -n "$(gnomeccuidir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(gnomeccuidir)'; $(am__uninstall_files_from_dir) -install-policykitDATA: $(policykit_DATA) - @$(NORMAL_INSTALL) - @list='$(policykit_DATA)'; test -n "$(policykitdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(policykitdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(policykitdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(policykitdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(policykitdir)" || exit $$?; \ - done - -uninstall-policykitDATA: - @$(NORMAL_UNINSTALL) - @list='$(policykit_DATA)'; test -n "$(policykitdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(policykitdir)'; $(am__uninstall_files_from_dir) - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-am -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-am - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-am - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) $(DATA) -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dbusservicedir)" "$(DESTDIR)$(dbussystemdir)" "$(DESTDIR)$(gnomeccuidir)" "$(DESTDIR)$(policykitdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-dbusserviceDATA install-dbussystemDATA \ - install-gnomeccuiDATA install-policykitDATA - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-dbusserviceDATA \ - uninstall-dbussystemDATA uninstall-gnomeccuiDATA \ - uninstall-policykitDATA - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ - clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dbusserviceDATA \ - install-dbussystemDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-gnomeccuiDATA install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-policykitDATA install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-dbusserviceDATA \ - uninstall-dbussystemDATA uninstall-gnomeccuiDATA \ - uninstall-policykitDATA - - -whoopsie-generated.c: whoopsie-preferences.xml - gdbus-codegen --interface-prefix com.ubuntu. \ - --generate-c-code whoopsie-generated \ - $< -@INTLTOOL_POLICY_RULE@ - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: Index: b/src/diagnostics/whoopsie-generated.c =================================================================== --- a/src/diagnostics/whoopsie-generated.c +++ /dev/null @@ -1,1740 +0,0 @@ -/* - * Generated by gdbus-codegen 2.37.4. DO NOT EDIT. - * - * The license of this code is the same as for the source it was derived from. - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "whoopsie-generated.h" - -#include -#ifdef G_OS_UNIX -# include -#endif - -typedef struct -{ - GDBusArgInfo parent_struct; - gboolean use_gvariant; -} _ExtendedGDBusArgInfo; - -typedef struct -{ - GDBusMethodInfo parent_struct; - const gchar *signal_name; - gboolean pass_fdlist; -} _ExtendedGDBusMethodInfo; - -typedef struct -{ - GDBusSignalInfo parent_struct; - const gchar *signal_name; -} _ExtendedGDBusSignalInfo; - -typedef struct -{ - GDBusPropertyInfo parent_struct; - const gchar *hyphen_name; - gboolean use_gvariant; -} _ExtendedGDBusPropertyInfo; - -typedef struct -{ - GDBusInterfaceInfo parent_struct; - const gchar *hyphen_name; -} _ExtendedGDBusInterfaceInfo; - -typedef struct -{ - const _ExtendedGDBusPropertyInfo *info; - guint prop_id; - GValue orig_value; /* the value before the change */ -} ChangedProperty; - -static void -_changed_property_free (ChangedProperty *data) -{ - g_value_unset (&data->orig_value); - g_free (data); -} - -static gboolean -_g_strv_equal0 (gchar **a, gchar **b) -{ - gboolean ret = FALSE; - guint n; - if (a == NULL && b == NULL) - { - ret = TRUE; - goto out; - } - if (a == NULL || b == NULL) - goto out; - if (g_strv_length (a) != g_strv_length (b)) - goto out; - for (n = 0; a[n] != NULL; n++) - if (g_strcmp0 (a[n], b[n]) != 0) - goto out; - ret = TRUE; -out: - return ret; -} - -static gboolean -_g_variant_equal0 (GVariant *a, GVariant *b) -{ - gboolean ret = FALSE; - if (a == NULL && b == NULL) - { - ret = TRUE; - goto out; - } - if (a == NULL || b == NULL) - goto out; - ret = g_variant_equal (a, b); -out: - return ret; -} - -G_GNUC_UNUSED static gboolean -_g_value_equal (const GValue *a, const GValue *b) -{ - gboolean ret = FALSE; - g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b)); - switch (G_VALUE_TYPE (a)) - { - case G_TYPE_BOOLEAN: - ret = (g_value_get_boolean (a) == g_value_get_boolean (b)); - break; - case G_TYPE_UCHAR: - ret = (g_value_get_uchar (a) == g_value_get_uchar (b)); - break; - case G_TYPE_INT: - ret = (g_value_get_int (a) == g_value_get_int (b)); - break; - case G_TYPE_UINT: - ret = (g_value_get_uint (a) == g_value_get_uint (b)); - break; - case G_TYPE_INT64: - ret = (g_value_get_int64 (a) == g_value_get_int64 (b)); - break; - case G_TYPE_UINT64: - ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b)); - break; - case G_TYPE_DOUBLE: - { - /* Avoid -Wfloat-equal warnings by doing a direct bit compare */ - gdouble da = g_value_get_double (a); - gdouble db = g_value_get_double (b); - ret = memcmp (&da, &db, sizeof (gdouble)) == 0; - } - break; - case G_TYPE_STRING: - ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0); - break; - case G_TYPE_VARIANT: - ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b)); - break; - default: - if (G_VALUE_TYPE (a) == G_TYPE_STRV) - ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b)); - else - g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a))); - break; - } - return ret; -} - -/* ------------------------------------------------------------------------ - * Code for interface com.ubuntu.WhoopsiePreferences - * ------------------------------------------------------------------------ - */ - -/** - * SECTION:WhoopsiePreferences - * @title: WhoopsiePreferences - * @short_description: Generated C code for the com.ubuntu.WhoopsiePreferences D-Bus interface - * - * This section contains code for working with the com.ubuntu.WhoopsiePreferences D-Bus interface in C. - */ - -/* ---- Introspection data for com.ubuntu.WhoopsiePreferences ---- */ - -static const _ExtendedGDBusArgInfo _whoopsie_preferences_method_info_set_report_crashes_IN_ARG_report = -{ - { - -1, - (gchar *) "report", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _whoopsie_preferences_method_info_set_report_crashes_IN_ARG_pointers[] = -{ - &_whoopsie_preferences_method_info_set_report_crashes_IN_ARG_report, - NULL -}; - -static const _ExtendedGDBusMethodInfo _whoopsie_preferences_method_info_set_report_crashes = -{ - { - -1, - (gchar *) "SetReportCrashes", - (GDBusArgInfo **) &_whoopsie_preferences_method_info_set_report_crashes_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-report-crashes", - FALSE -}; - -static const _ExtendedGDBusArgInfo _whoopsie_preferences_method_info_set_report_metrics_IN_ARG_report = -{ - { - -1, - (gchar *) "report", - (gchar *) "b", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _whoopsie_preferences_method_info_set_report_metrics_IN_ARG_pointers[] = -{ - &_whoopsie_preferences_method_info_set_report_metrics_IN_ARG_report, - NULL -}; - -static const _ExtendedGDBusMethodInfo _whoopsie_preferences_method_info_set_report_metrics = -{ - { - -1, - (gchar *) "SetReportMetrics", - (GDBusArgInfo **) &_whoopsie_preferences_method_info_set_report_metrics_IN_ARG_pointers, - NULL, - NULL - }, - "handle-set-report-metrics", - FALSE -}; - -static const _ExtendedGDBusArgInfo _whoopsie_preferences_method_info_get_identifier_OUT_ARG_identifier = -{ - { - -1, - (gchar *) "identifier", - (gchar *) "s", - NULL - }, - FALSE -}; - -static const _ExtendedGDBusArgInfo * const _whoopsie_preferences_method_info_get_identifier_OUT_ARG_pointers[] = -{ - &_whoopsie_preferences_method_info_get_identifier_OUT_ARG_identifier, - NULL -}; - -static const _ExtendedGDBusMethodInfo _whoopsie_preferences_method_info_get_identifier = -{ - { - -1, - (gchar *) "GetIdentifier", - NULL, - (GDBusArgInfo **) &_whoopsie_preferences_method_info_get_identifier_OUT_ARG_pointers, - NULL - }, - "handle-get-identifier", - FALSE -}; - -static const _ExtendedGDBusMethodInfo * const _whoopsie_preferences_method_info_pointers[] = -{ - &_whoopsie_preferences_method_info_set_report_crashes, - &_whoopsie_preferences_method_info_set_report_metrics, - &_whoopsie_preferences_method_info_get_identifier, - NULL -}; - -static const _ExtendedGDBusPropertyInfo _whoopsie_preferences_property_info_report_crashes = -{ - { - -1, - (gchar *) "ReportCrashes", - (gchar *) "b", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "report-crashes", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo _whoopsie_preferences_property_info_report_metrics = -{ - { - -1, - (gchar *) "ReportMetrics", - (gchar *) "b", - G_DBUS_PROPERTY_INFO_FLAGS_READABLE, - NULL - }, - "report-metrics", - FALSE -}; - -static const _ExtendedGDBusPropertyInfo * const _whoopsie_preferences_property_info_pointers[] = -{ - &_whoopsie_preferences_property_info_report_crashes, - &_whoopsie_preferences_property_info_report_metrics, - NULL -}; - -static const _ExtendedGDBusInterfaceInfo _whoopsie_preferences_interface_info = -{ - { - -1, - (gchar *) "com.ubuntu.WhoopsiePreferences", - (GDBusMethodInfo **) &_whoopsie_preferences_method_info_pointers, - NULL, - (GDBusPropertyInfo **) &_whoopsie_preferences_property_info_pointers, - NULL - }, - "whoopsie-preferences", -}; - - -/** - * whoopsie_preferences_interface_info: - * - * Gets a machine-readable description of the com.ubuntu.WhoopsiePreferences D-Bus interface. - * - * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free. - */ -GDBusInterfaceInfo * -whoopsie_preferences_interface_info (void) -{ - return (GDBusInterfaceInfo *) &_whoopsie_preferences_interface_info.parent_struct; -} - -/** - * whoopsie_preferences_override_properties: - * @klass: The class structure for a #GObject-derived class. - * @property_id_begin: The property id to assign to the first overridden property. - * - * Overrides all #GObject properties in the #WhoopsiePreferences interface for a concrete class. - * The properties are overridden in the order they are defined. - * - * Returns: The last property id. - */ -guint -whoopsie_preferences_override_properties (GObjectClass *klass, guint property_id_begin) -{ - g_object_class_override_property (klass, property_id_begin++, "report-crashes"); - g_object_class_override_property (klass, property_id_begin++, "report-metrics"); - return property_id_begin - 1; -} - - - -/** - * WhoopsiePreferences: - * - * Abstract interface type for the D-Bus interface com.ubuntu.WhoopsiePreferences. - */ - -/** - * WhoopsiePreferencesIface: - * @parent_iface: The parent interface. - * @handle_get_identifier: Handler for the #WhoopsiePreferences::handle-get-identifier signal. - * @handle_set_report_crashes: Handler for the #WhoopsiePreferences::handle-set-report-crashes signal. - * @handle_set_report_metrics: Handler for the #WhoopsiePreferences::handle-set-report-metrics signal. - * @get_report_crashes: Getter for the #WhoopsiePreferences:report-crashes property. - * @get_report_metrics: Getter for the #WhoopsiePreferences:report-metrics property. - * - * Virtual table for the D-Bus interface com.ubuntu.WhoopsiePreferences. - */ - -typedef WhoopsiePreferencesIface WhoopsiePreferencesInterface; -G_DEFINE_INTERFACE (WhoopsiePreferences, whoopsie_preferences, G_TYPE_OBJECT); - -static void -whoopsie_preferences_default_init (WhoopsiePreferencesIface *iface) -{ - /* GObject signals for incoming D-Bus method calls: */ - /** - * WhoopsiePreferences::handle-set-report-crashes: - * @object: A #WhoopsiePreferences. - * @invocation: A #GDBusMethodInvocation. - * @arg_report: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetReportCrashes() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call whoopsie_preferences_complete_set_report_crashes() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-report-crashes", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (WhoopsiePreferencesIface, handle_set_report_crashes), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN); - - /** - * WhoopsiePreferences::handle-set-report-metrics: - * @object: A #WhoopsiePreferences. - * @invocation: A #GDBusMethodInvocation. - * @arg_report: Argument passed by remote caller. - * - * Signal emitted when a remote caller is invoking the SetReportMetrics() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call whoopsie_preferences_complete_set_report_metrics() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-set-report-metrics", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (WhoopsiePreferencesIface, handle_set_report_metrics), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 2, - G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_BOOLEAN); - - /** - * WhoopsiePreferences::handle-get-identifier: - * @object: A #WhoopsiePreferences. - * @invocation: A #GDBusMethodInvocation. - * - * Signal emitted when a remote caller is invoking the GetIdentifier() D-Bus method. - * - * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call whoopsie_preferences_complete_get_identifier() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned. - * - * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run. - */ - g_signal_new ("handle-get-identifier", - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (WhoopsiePreferencesIface, handle_get_identifier), - g_signal_accumulator_true_handled, - NULL, - g_cclosure_marshal_generic, - G_TYPE_BOOLEAN, - 1, - G_TYPE_DBUS_METHOD_INVOCATION); - - /* GObject properties for D-Bus properties: */ - /** - * WhoopsiePreferences:report-crashes: - * - * Represents the D-Bus property "ReportCrashes". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_boolean ("report-crashes", "ReportCrashes", "ReportCrashes", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - /** - * WhoopsiePreferences:report-metrics: - * - * Represents the D-Bus property "ReportMetrics". - * - * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side. - */ - g_object_interface_install_property (iface, - g_param_spec_boolean ("report-metrics", "ReportMetrics", "ReportMetrics", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); -} - -/** - * whoopsie_preferences_get_report_crashes: (skip) - * @object: A #WhoopsiePreferences. - * - * Gets the value of the "ReportCrashes" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -gboolean -whoopsie_preferences_get_report_crashes (WhoopsiePreferences *object) -{ - return WHOOPSIE_PREFERENCES_GET_IFACE (object)->get_report_crashes (object); -} - -/** - * whoopsie_preferences_set_report_crashes: (skip) - * @object: A #WhoopsiePreferences. - * @value: The value to set. - * - * Sets the "ReportCrashes" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -whoopsie_preferences_set_report_crashes (WhoopsiePreferences *object, gboolean value) -{ - g_object_set (G_OBJECT (object), "report-crashes", value, NULL); -} - -/** - * whoopsie_preferences_get_report_metrics: (skip) - * @object: A #WhoopsiePreferences. - * - * Gets the value of the "ReportMetrics" D-Bus property. - * - * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. - * - * Returns: The property value. - */ -gboolean -whoopsie_preferences_get_report_metrics (WhoopsiePreferences *object) -{ - return WHOOPSIE_PREFERENCES_GET_IFACE (object)->get_report_metrics (object); -} - -/** - * whoopsie_preferences_set_report_metrics: (skip) - * @object: A #WhoopsiePreferences. - * @value: The value to set. - * - * Sets the "ReportMetrics" D-Bus property to @value. - * - * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. - */ -void -whoopsie_preferences_set_report_metrics (WhoopsiePreferences *object, gboolean value) -{ - g_object_set (G_OBJECT (object), "report-metrics", value, NULL); -} - -/** - * whoopsie_preferences_call_set_report_crashes: - * @proxy: A #WhoopsiePreferencesProxy. - * @arg_report: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetReportCrashes() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call whoopsie_preferences_call_set_report_crashes_finish() to get the result of the operation. - * - * See whoopsie_preferences_call_set_report_crashes_sync() for the synchronous, blocking version of this method. - */ -void -whoopsie_preferences_call_set_report_crashes ( - WhoopsiePreferences *proxy, - gboolean arg_report, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetReportCrashes", - g_variant_new ("(b)", - arg_report), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * whoopsie_preferences_call_set_report_crashes_finish: - * @proxy: A #WhoopsiePreferencesProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to whoopsie_preferences_call_set_report_crashes(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with whoopsie_preferences_call_set_report_crashes(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -whoopsie_preferences_call_set_report_crashes_finish ( - WhoopsiePreferences *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * whoopsie_preferences_call_set_report_crashes_sync: - * @proxy: A #WhoopsiePreferencesProxy. - * @arg_report: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetReportCrashes() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See whoopsie_preferences_call_set_report_crashes() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -whoopsie_preferences_call_set_report_crashes_sync ( - WhoopsiePreferences *proxy, - gboolean arg_report, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetReportCrashes", - g_variant_new ("(b)", - arg_report), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * whoopsie_preferences_call_set_report_metrics: - * @proxy: A #WhoopsiePreferencesProxy. - * @arg_report: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the SetReportMetrics() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call whoopsie_preferences_call_set_report_metrics_finish() to get the result of the operation. - * - * See whoopsie_preferences_call_set_report_metrics_sync() for the synchronous, blocking version of this method. - */ -void -whoopsie_preferences_call_set_report_metrics ( - WhoopsiePreferences *proxy, - gboolean arg_report, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "SetReportMetrics", - g_variant_new ("(b)", - arg_report), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * whoopsie_preferences_call_set_report_metrics_finish: - * @proxy: A #WhoopsiePreferencesProxy. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to whoopsie_preferences_call_set_report_metrics(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with whoopsie_preferences_call_set_report_metrics(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -whoopsie_preferences_call_set_report_metrics_finish ( - WhoopsiePreferences *proxy, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * whoopsie_preferences_call_set_report_metrics_sync: - * @proxy: A #WhoopsiePreferencesProxy. - * @arg_report: Argument to pass with the method invocation. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the SetReportMetrics() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See whoopsie_preferences_call_set_report_metrics() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -whoopsie_preferences_call_set_report_metrics_sync ( - WhoopsiePreferences *proxy, - gboolean arg_report, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "SetReportMetrics", - g_variant_new ("(b)", - arg_report), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "()"); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * whoopsie_preferences_call_get_identifier: - * @proxy: A #WhoopsiePreferencesProxy. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL. - * @user_data: User data to pass to @callback. - * - * Asynchronously invokes the GetIdentifier() D-Bus method on @proxy. - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call whoopsie_preferences_call_get_identifier_finish() to get the result of the operation. - * - * See whoopsie_preferences_call_get_identifier_sync() for the synchronous, blocking version of this method. - */ -void -whoopsie_preferences_call_get_identifier ( - WhoopsiePreferences *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_dbus_proxy_call (G_DBUS_PROXY (proxy), - "GetIdentifier", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - callback, - user_data); -} - -/** - * whoopsie_preferences_call_get_identifier_finish: - * @proxy: A #WhoopsiePreferencesProxy. - * @out_identifier: (out): Return location for return parameter or %NULL to ignore. - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to whoopsie_preferences_call_get_identifier(). - * @error: Return location for error or %NULL. - * - * Finishes an operation started with whoopsie_preferences_call_get_identifier(). - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -whoopsie_preferences_call_get_identifier_finish ( - WhoopsiePreferences *proxy, - gchar **out_identifier, - GAsyncResult *res, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s)", - out_identifier); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * whoopsie_preferences_call_get_identifier_sync: - * @proxy: A #WhoopsiePreferencesProxy. - * @out_identifier: (out): Return location for return parameter or %NULL to ignore. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL. - * - * Synchronously invokes the GetIdentifier() D-Bus method on @proxy. The calling thread is blocked until a reply is received. - * - * See whoopsie_preferences_call_get_identifier() for the asynchronous version of this method. - * - * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. - */ -gboolean -whoopsie_preferences_call_get_identifier_sync ( - WhoopsiePreferences *proxy, - gchar **out_identifier, - GCancellable *cancellable, - GError **error) -{ - GVariant *_ret; - _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy), - "GetIdentifier", - g_variant_new ("()"), - G_DBUS_CALL_FLAGS_NONE, - -1, - cancellable, - error); - if (_ret == NULL) - goto _out; - g_variant_get (_ret, - "(s)", - out_identifier); - g_variant_unref (_ret); -_out: - return _ret != NULL; -} - -/** - * whoopsie_preferences_complete_set_report_crashes: - * @object: A #WhoopsiePreferences. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetReportCrashes() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -whoopsie_preferences_complete_set_report_crashes ( - WhoopsiePreferences *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * whoopsie_preferences_complete_set_report_metrics: - * @object: A #WhoopsiePreferences. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * - * Helper function used in service implementations to finish handling invocations of the SetReportMetrics() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -whoopsie_preferences_complete_set_report_metrics ( - WhoopsiePreferences *object, - GDBusMethodInvocation *invocation) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("()")); -} - -/** - * whoopsie_preferences_complete_get_identifier: - * @object: A #WhoopsiePreferences. - * @invocation: (transfer full): A #GDBusMethodInvocation. - * @identifier: Parameter to return. - * - * Helper function used in service implementations to finish handling invocations of the GetIdentifier() D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar. - * - * This method will free @invocation, you cannot use it afterwards. - */ -void -whoopsie_preferences_complete_get_identifier ( - WhoopsiePreferences *object, - GDBusMethodInvocation *invocation, - const gchar *identifier) -{ - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(s)", - identifier)); -} - -/* ------------------------------------------------------------------------ */ - -/** - * WhoopsiePreferencesProxy: - * - * The #WhoopsiePreferencesProxy structure contains only private data and should only be accessed using the provided API. - */ - -/** - * WhoopsiePreferencesProxyClass: - * @parent_class: The parent class. - * - * Class structure for #WhoopsiePreferencesProxy. - */ - -struct _WhoopsiePreferencesProxyPrivate -{ - GData *qdata; -}; - -static void whoopsie_preferences_proxy_iface_init (WhoopsiePreferencesIface *iface); - -G_DEFINE_TYPE_WITH_CODE (WhoopsiePreferencesProxy, whoopsie_preferences_proxy, G_TYPE_DBUS_PROXY, - G_ADD_PRIVATE (WhoopsiePreferencesProxy) - G_IMPLEMENT_INTERFACE (TYPE_WHOOPSIE_PREFERENCES, whoopsie_preferences_proxy_iface_init)); - -static void -whoopsie_preferences_proxy_finalize (GObject *object) -{ - WhoopsiePreferencesProxy *proxy = WHOOPSIE_PREFERENCES_PROXY (object); - g_datalist_clear (&proxy->priv->qdata); - G_OBJECT_CLASS (whoopsie_preferences_proxy_parent_class)->finalize (object); -} - -static void -whoopsie_preferences_proxy_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - const _ExtendedGDBusPropertyInfo *info; - GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 2); - info = _whoopsie_preferences_property_info_pointers[prop_id - 1]; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name); - if (info->use_gvariant) - { - g_value_set_variant (value, variant); - } - else - { - if (variant != NULL) - g_dbus_gvariant_to_gvalue (variant, value); - } - if (variant != NULL) - g_variant_unref (variant); -} - -static void -whoopsie_preferences_proxy_set_property_cb (GDBusProxy *proxy, - GAsyncResult *res, - gpointer user_data) -{ - const _ExtendedGDBusPropertyInfo *info = user_data; - GError *error; - error = NULL; - if (!g_dbus_proxy_call_finish (proxy, res, &error)) - { - g_warning ("Error setting property '%s' on interface com.ubuntu.WhoopsiePreferences: %s (%s, %d)", - info->parent_struct.name, - error->message, g_quark_to_string (error->domain), error->code); - g_error_free (error); - } -} - -static void -whoopsie_preferences_proxy_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - const _ExtendedGDBusPropertyInfo *info; - GVariant *variant; - g_assert (prop_id != 0 && prop_id - 1 < 2); - info = _whoopsie_preferences_property_info_pointers[prop_id - 1]; - variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature)); - g_dbus_proxy_call (G_DBUS_PROXY (object), - "org.freedesktop.DBus.Properties.Set", - g_variant_new ("(ssv)", "com.ubuntu.WhoopsiePreferences", info->parent_struct.name, variant), - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, (GAsyncReadyCallback) whoopsie_preferences_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); - g_variant_unref (variant); -} - -static void -whoopsie_preferences_proxy_g_signal (GDBusProxy *proxy, - const gchar *sender_name G_GNUC_UNUSED, - const gchar *signal_name, - GVariant *parameters) -{ - _ExtendedGDBusSignalInfo *info; - GVariantIter iter; - GVariant *child; - GValue *paramv; - guint num_params; - guint n; - guint signal_id; - info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_whoopsie_preferences_interface_info.parent_struct, signal_name); - if (info == NULL) - return; - num_params = g_variant_n_children (parameters); - paramv = g_new0 (GValue, num_params + 1); - g_value_init (¶mv[0], TYPE_WHOOPSIE_PREFERENCES); - g_value_set_object (¶mv[0], proxy); - g_variant_iter_init (&iter, parameters); - n = 1; - while ((child = g_variant_iter_next_value (&iter)) != NULL) - { - _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1]; - if (arg_info->use_gvariant) - { - g_value_init (¶mv[n], G_TYPE_VARIANT); - g_value_set_variant (¶mv[n], child); - n++; - } - else - g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); - g_variant_unref (child); - } - signal_id = g_signal_lookup (info->signal_name, TYPE_WHOOPSIE_PREFERENCES); - g_signal_emitv (paramv, signal_id, 0, NULL); - for (n = 0; n < num_params + 1; n++) - g_value_unset (¶mv[n]); - g_free (paramv); -} - -static void -whoopsie_preferences_proxy_g_properties_changed (GDBusProxy *_proxy, - GVariant *changed_properties, - const gchar *const *invalidated_properties) -{ - WhoopsiePreferencesProxy *proxy = WHOOPSIE_PREFERENCES_PROXY (_proxy); - guint n; - const gchar *key; - GVariantIter *iter; - _ExtendedGDBusPropertyInfo *info; - g_variant_get (changed_properties, "a{sv}", &iter); - while (g_variant_iter_next (iter, "{&sv}", &key, NULL)) - { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_whoopsie_preferences_interface_info.parent_struct, key); - g_datalist_remove_data (&proxy->priv->qdata, key); - if (info != NULL) - g_object_notify (G_OBJECT (proxy), info->hyphen_name); - } - g_variant_iter_free (iter); - for (n = 0; invalidated_properties[n] != NULL; n++) - { - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_whoopsie_preferences_interface_info.parent_struct, invalidated_properties[n]); - g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]); - if (info != NULL) - g_object_notify (G_OBJECT (proxy), info->hyphen_name); - } -} - -static gboolean -whoopsie_preferences_proxy_get_report_crashes (WhoopsiePreferences *object) -{ - WhoopsiePreferencesProxy *proxy = WHOOPSIE_PREFERENCES_PROXY (object); - GVariant *variant; - gboolean value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "ReportCrashes"); - if (variant != NULL) - { - value = g_variant_get_boolean (variant); - g_variant_unref (variant); - } - return value; -} - -static gboolean -whoopsie_preferences_proxy_get_report_metrics (WhoopsiePreferences *object) -{ - WhoopsiePreferencesProxy *proxy = WHOOPSIE_PREFERENCES_PROXY (object); - GVariant *variant; - gboolean value = 0; - variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "ReportMetrics"); - if (variant != NULL) - { - value = g_variant_get_boolean (variant); - g_variant_unref (variant); - } - return value; -} - -static void -whoopsie_preferences_proxy_init (WhoopsiePreferencesProxy *proxy) -{ - proxy->priv = whoopsie_preferences_proxy_get_instance_private (proxy); - g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), whoopsie_preferences_interface_info ()); -} - -static void -whoopsie_preferences_proxy_class_init (WhoopsiePreferencesProxyClass *klass) -{ - GObjectClass *gobject_class; - GDBusProxyClass *proxy_class; - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = whoopsie_preferences_proxy_finalize; - gobject_class->get_property = whoopsie_preferences_proxy_get_property; - gobject_class->set_property = whoopsie_preferences_proxy_set_property; - - proxy_class = G_DBUS_PROXY_CLASS (klass); - proxy_class->g_signal = whoopsie_preferences_proxy_g_signal; - proxy_class->g_properties_changed = whoopsie_preferences_proxy_g_properties_changed; - - - whoopsie_preferences_override_properties (gobject_class, 1); -} - -static void -whoopsie_preferences_proxy_iface_init (WhoopsiePreferencesIface *iface) -{ - iface->get_report_crashes = whoopsie_preferences_proxy_get_report_crashes; - iface->get_report_metrics = whoopsie_preferences_proxy_get_report_metrics; -} - -/** - * whoopsie_preferences_proxy_new: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Asynchronously creates a proxy for the D-Bus interface com.ubuntu.WhoopsiePreferences. See g_dbus_proxy_new() for more details. - * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call whoopsie_preferences_proxy_new_finish() to get the result of the operation. - * - * See whoopsie_preferences_proxy_new_sync() for the synchronous, blocking version of this constructor. - */ -void -whoopsie_preferences_proxy_new ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_async_initable_new_async (TYPE_WHOOPSIE_PREFERENCES_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.ubuntu.WhoopsiePreferences", NULL); -} - -/** - * whoopsie_preferences_proxy_new_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to whoopsie_preferences_proxy_new(). - * @error: Return location for error or %NULL - * - * Finishes an operation started with whoopsie_preferences_proxy_new(). - * - * Returns: (transfer full) (type WhoopsiePreferencesProxy): The constructed proxy object or %NULL if @error is set. - */ -WhoopsiePreferences * -whoopsie_preferences_proxy_new_finish ( - GAsyncResult *res, - GError **error) -{ - GObject *ret; - GObject *source_object; - source_object = g_async_result_get_source_object (res); - ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); - g_object_unref (source_object); - if (ret != NULL) - return WHOOPSIE_PREFERENCES (ret); - else - return NULL; -} - -/** - * whoopsie_preferences_proxy_new_sync: - * @connection: A #GDBusConnection. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Synchronously creates a proxy for the D-Bus interface com.ubuntu.WhoopsiePreferences. See g_dbus_proxy_new_sync() for more details. - * - * The calling thread is blocked until a reply is received. - * - * See whoopsie_preferences_proxy_new() for the asynchronous version of this constructor. - * - * Returns: (transfer full) (type WhoopsiePreferencesProxy): The constructed proxy object or %NULL if @error is set. - */ -WhoopsiePreferences * -whoopsie_preferences_proxy_new_sync ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error) -{ - GInitable *ret; - ret = g_initable_new (TYPE_WHOOPSIE_PREFERENCES_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.ubuntu.WhoopsiePreferences", NULL); - if (ret != NULL) - return WHOOPSIE_PREFERENCES (ret); - else - return NULL; -} - - -/** - * whoopsie_preferences_proxy_new_for_bus: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @callback: A #GAsyncReadyCallback to call when the request is satisfied. - * @user_data: User data to pass to @callback. - * - * Like whoopsie_preferences_proxy_new() but takes a #GBusType instead of a #GDBusConnection. - * - * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. - * You can then call whoopsie_preferences_proxy_new_for_bus_finish() to get the result of the operation. - * - * See whoopsie_preferences_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. - */ -void -whoopsie_preferences_proxy_new_for_bus ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - g_async_initable_new_async (TYPE_WHOOPSIE_PREFERENCES_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.ubuntu.WhoopsiePreferences", NULL); -} - -/** - * whoopsie_preferences_proxy_new_for_bus_finish: - * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to whoopsie_preferences_proxy_new_for_bus(). - * @error: Return location for error or %NULL - * - * Finishes an operation started with whoopsie_preferences_proxy_new_for_bus(). - * - * Returns: (transfer full) (type WhoopsiePreferencesProxy): The constructed proxy object or %NULL if @error is set. - */ -WhoopsiePreferences * -whoopsie_preferences_proxy_new_for_bus_finish ( - GAsyncResult *res, - GError **error) -{ - GObject *ret; - GObject *source_object; - source_object = g_async_result_get_source_object (res); - ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error); - g_object_unref (source_object); - if (ret != NULL) - return WHOOPSIE_PREFERENCES (ret); - else - return NULL; -} - -/** - * whoopsie_preferences_proxy_new_for_bus_sync: - * @bus_type: A #GBusType. - * @flags: Flags from the #GDBusProxyFlags enumeration. - * @name: A bus name (well-known or unique). - * @object_path: An object path. - * @cancellable: (allow-none): A #GCancellable or %NULL. - * @error: Return location for error or %NULL - * - * Like whoopsie_preferences_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. - * - * The calling thread is blocked until a reply is received. - * - * See whoopsie_preferences_proxy_new_for_bus() for the asynchronous version of this constructor. - * - * Returns: (transfer full) (type WhoopsiePreferencesProxy): The constructed proxy object or %NULL if @error is set. - */ -WhoopsiePreferences * -whoopsie_preferences_proxy_new_for_bus_sync ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error) -{ - GInitable *ret; - ret = g_initable_new (TYPE_WHOOPSIE_PREFERENCES_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.ubuntu.WhoopsiePreferences", NULL); - if (ret != NULL) - return WHOOPSIE_PREFERENCES (ret); - else - return NULL; -} - - -/* ------------------------------------------------------------------------ */ - -/** - * WhoopsiePreferencesSkeleton: - * - * The #WhoopsiePreferencesSkeleton structure contains only private data and should only be accessed using the provided API. - */ - -/** - * WhoopsiePreferencesSkeletonClass: - * @parent_class: The parent class. - * - * Class structure for #WhoopsiePreferencesSkeleton. - */ - -struct _WhoopsiePreferencesSkeletonPrivate -{ - GValue *properties; - GList *changed_properties; - GSource *changed_properties_idle_source; - GMainContext *context; - GMutex lock; -}; - -static void -_whoopsie_preferences_skeleton_handle_method_call ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name, - const gchar *method_name, - GVariant *parameters, - GDBusMethodInvocation *invocation, - gpointer user_data) -{ - WhoopsiePreferencesSkeleton *skeleton = WHOOPSIE_PREFERENCES_SKELETON (user_data); - _ExtendedGDBusMethodInfo *info; - GVariantIter iter; - GVariant *child; - GValue *paramv; - guint num_params; - guint num_extra; - guint n; - guint signal_id; - GValue return_value = G_VALUE_INIT; - info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation); - g_assert (info != NULL); - num_params = g_variant_n_children (parameters); - num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra); - n = 0; - g_value_init (¶mv[n], TYPE_WHOOPSIE_PREFERENCES); - g_value_set_object (¶mv[n++], skeleton); - g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION); - g_value_set_object (¶mv[n++], invocation); - if (info->pass_fdlist) - { -#ifdef G_OS_UNIX - g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST); - g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation))); -#else - g_assert_not_reached (); -#endif - } - g_variant_iter_init (&iter, parameters); - while ((child = g_variant_iter_next_value (&iter)) != NULL) - { - _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra]; - if (arg_info->use_gvariant) - { - g_value_init (¶mv[n], G_TYPE_VARIANT); - g_value_set_variant (¶mv[n], child); - n++; - } - else - g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); - g_variant_unref (child); - } - signal_id = g_signal_lookup (info->signal_name, TYPE_WHOOPSIE_PREFERENCES); - g_value_init (&return_value, G_TYPE_BOOLEAN); - g_signal_emitv (paramv, signal_id, 0, &return_value); - if (!g_value_get_boolean (&return_value)) - g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name); - g_value_unset (&return_value); - for (n = 0; n < num_params + num_extra; n++) - g_value_unset (¶mv[n]); - g_free (paramv); -} - -static GVariant * -_whoopsie_preferences_skeleton_handle_get_property ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name G_GNUC_UNUSED, - const gchar *property_name, - GError **error, - gpointer user_data) -{ - WhoopsiePreferencesSkeleton *skeleton = WHOOPSIE_PREFERENCES_SKELETON (user_data); - GValue value = G_VALUE_INIT; - GParamSpec *pspec; - _ExtendedGDBusPropertyInfo *info; - GVariant *ret; - ret = NULL; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_whoopsie_preferences_interface_info.parent_struct, property_name); - g_assert (info != NULL); - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); - if (pspec == NULL) - { - g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); - } - else - { - g_value_init (&value, pspec->value_type); - g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value); - ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature)); - g_value_unset (&value); - } - return ret; -} - -static gboolean -_whoopsie_preferences_skeleton_handle_set_property ( - GDBusConnection *connection G_GNUC_UNUSED, - const gchar *sender G_GNUC_UNUSED, - const gchar *object_path G_GNUC_UNUSED, - const gchar *interface_name G_GNUC_UNUSED, - const gchar *property_name, - GVariant *variant, - GError **error, - gpointer user_data) -{ - WhoopsiePreferencesSkeleton *skeleton = WHOOPSIE_PREFERENCES_SKELETON (user_data); - GValue value = G_VALUE_INIT; - GParamSpec *pspec; - _ExtendedGDBusPropertyInfo *info; - gboolean ret; - ret = FALSE; - info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_whoopsie_preferences_interface_info.parent_struct, property_name); - g_assert (info != NULL); - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name); - if (pspec == NULL) - { - g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name); - } - else - { - if (info->use_gvariant) - g_value_set_variant (&value, variant); - else - g_dbus_gvariant_to_gvalue (variant, &value); - g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value); - g_value_unset (&value); - ret = TRUE; - } - return ret; -} - -static const GDBusInterfaceVTable _whoopsie_preferences_skeleton_vtable = -{ - _whoopsie_preferences_skeleton_handle_method_call, - _whoopsie_preferences_skeleton_handle_get_property, - _whoopsie_preferences_skeleton_handle_set_property, - {NULL} -}; - -static GDBusInterfaceInfo * -whoopsie_preferences_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) -{ - return whoopsie_preferences_interface_info (); -} - -static GDBusInterfaceVTable * -whoopsie_preferences_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) -{ - return (GDBusInterfaceVTable *) &_whoopsie_preferences_skeleton_vtable; -} - -static GVariant * -whoopsie_preferences_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) -{ - WhoopsiePreferencesSkeleton *skeleton = WHOOPSIE_PREFERENCES_SKELETON (_skeleton); - - GVariantBuilder builder; - guint n; - g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - if (_whoopsie_preferences_interface_info.parent_struct.properties == NULL) - goto out; - for (n = 0; _whoopsie_preferences_interface_info.parent_struct.properties[n] != NULL; n++) - { - GDBusPropertyInfo *info = _whoopsie_preferences_interface_info.parent_struct.properties[n]; - if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) - { - GVariant *value; - value = _whoopsie_preferences_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.ubuntu.WhoopsiePreferences", info->name, NULL, skeleton); - if (value != NULL) - { - g_variant_take_ref (value); - g_variant_builder_add (&builder, "{sv}", info->name, value); - g_variant_unref (value); - } - } - } -out: - return g_variant_builder_end (&builder); -} - -static gboolean _whoopsie_preferences_emit_changed (gpointer user_data); - -static void -whoopsie_preferences_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) -{ - WhoopsiePreferencesSkeleton *skeleton = WHOOPSIE_PREFERENCES_SKELETON (_skeleton); - gboolean emit_changed = FALSE; - - g_mutex_lock (&skeleton->priv->lock); - if (skeleton->priv->changed_properties_idle_source != NULL) - { - g_source_destroy (skeleton->priv->changed_properties_idle_source); - skeleton->priv->changed_properties_idle_source = NULL; - emit_changed = TRUE; - } - g_mutex_unlock (&skeleton->priv->lock); - - if (emit_changed) - _whoopsie_preferences_emit_changed (skeleton); -} - -static void whoopsie_preferences_skeleton_iface_init (WhoopsiePreferencesIface *iface); -G_DEFINE_TYPE_WITH_CODE (WhoopsiePreferencesSkeleton, whoopsie_preferences_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, - G_ADD_PRIVATE (WhoopsiePreferencesSkeleton) - G_IMPLEMENT_INTERFACE (TYPE_WHOOPSIE_PREFERENCES, whoopsie_preferences_skeleton_iface_init)); - -static void -whoopsie_preferences_skeleton_finalize (GObject *object) -{ - WhoopsiePreferencesSkeleton *skeleton = WHOOPSIE_PREFERENCES_SKELETON (object); - guint n; - for (n = 0; n < 2; n++) - g_value_unset (&skeleton->priv->properties[n]); - g_free (skeleton->priv->properties); - g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); - if (skeleton->priv->changed_properties_idle_source != NULL) - g_source_destroy (skeleton->priv->changed_properties_idle_source); - g_main_context_unref (skeleton->priv->context); - g_mutex_clear (&skeleton->priv->lock); - G_OBJECT_CLASS (whoopsie_preferences_skeleton_parent_class)->finalize (object); -} - -static void -whoopsie_preferences_skeleton_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec G_GNUC_UNUSED) -{ - WhoopsiePreferencesSkeleton *skeleton = WHOOPSIE_PREFERENCES_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 2); - g_mutex_lock (&skeleton->priv->lock); - g_value_copy (&skeleton->priv->properties[prop_id - 1], value); - g_mutex_unlock (&skeleton->priv->lock); -} - -static gboolean -_whoopsie_preferences_emit_changed (gpointer user_data) -{ - WhoopsiePreferencesSkeleton *skeleton = WHOOPSIE_PREFERENCES_SKELETON (user_data); - GList *l; - GVariantBuilder builder; - GVariantBuilder invalidated_builder; - guint num_changes; - - g_mutex_lock (&skeleton->priv->lock); - g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); - g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as")); - for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next) - { - ChangedProperty *cp = l->data; - GVariant *variant; - const GValue *cur_value; - - cur_value = &skeleton->priv->properties[cp->prop_id - 1]; - if (!_g_value_equal (cur_value, &cp->orig_value)) - { - variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature)); - g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant); - g_variant_unref (variant); - num_changes++; - } - } - if (num_changes > 0) - { - GList *connections, *ll; - GVariant *signal_variant; - signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "com.ubuntu.WhoopsiePreferences", - &builder, &invalidated_builder)); - connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton)); - for (ll = connections; ll != NULL; ll = ll->next) - { - GDBusConnection *connection = ll->data; - - g_dbus_connection_emit_signal (connection, - NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), - "org.freedesktop.DBus.Properties", - "PropertiesChanged", - signal_variant, - NULL); - } - g_variant_unref (signal_variant); - g_list_free_full (connections, g_object_unref); - } - else - { - g_variant_builder_clear (&builder); - g_variant_builder_clear (&invalidated_builder); - } - g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free); - skeleton->priv->changed_properties = NULL; - skeleton->priv->changed_properties_idle_source = NULL; - g_mutex_unlock (&skeleton->priv->lock); - return FALSE; -} - -static void -_whoopsie_preferences_schedule_emit_changed (WhoopsiePreferencesSkeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value) -{ - ChangedProperty *cp; - GList *l; - cp = NULL; - for (l = skeleton->priv->changed_properties; l != NULL; l = l->next) - { - ChangedProperty *i_cp = l->data; - if (i_cp->info == info) - { - cp = i_cp; - break; - } - } - if (cp == NULL) - { - cp = g_new0 (ChangedProperty, 1); - cp->prop_id = prop_id; - cp->info = info; - skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp); - g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value)); - g_value_copy (orig_value, &cp->orig_value); - } -} - -static void -whoopsie_preferences_skeleton_notify (GObject *object, - GParamSpec *pspec G_GNUC_UNUSED) -{ - WhoopsiePreferencesSkeleton *skeleton = WHOOPSIE_PREFERENCES_SKELETON (object); - g_mutex_lock (&skeleton->priv->lock); - if (skeleton->priv->changed_properties != NULL && - skeleton->priv->changed_properties_idle_source == NULL) - { - skeleton->priv->changed_properties_idle_source = g_idle_source_new (); - g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT); - g_source_set_callback (skeleton->priv->changed_properties_idle_source, _whoopsie_preferences_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref); - g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context); - g_source_unref (skeleton->priv->changed_properties_idle_source); - } - g_mutex_unlock (&skeleton->priv->lock); -} - -static void -whoopsie_preferences_skeleton_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - WhoopsiePreferencesSkeleton *skeleton = WHOOPSIE_PREFERENCES_SKELETON (object); - g_assert (prop_id != 0 && prop_id - 1 < 2); - g_mutex_lock (&skeleton->priv->lock); - g_object_freeze_notify (object); - if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1])) - { - if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL) - _whoopsie_preferences_schedule_emit_changed (skeleton, _whoopsie_preferences_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]); - g_value_copy (value, &skeleton->priv->properties[prop_id - 1]); - g_object_notify_by_pspec (object, pspec); - } - g_mutex_unlock (&skeleton->priv->lock); - g_object_thaw_notify (object); -} - -static void -whoopsie_preferences_skeleton_init (WhoopsiePreferencesSkeleton *skeleton) -{ - skeleton->priv = whoopsie_preferences_skeleton_get_instance_private (skeleton); - g_mutex_init (&skeleton->priv->lock); - skeleton->priv->context = g_main_context_ref_thread_default (); - skeleton->priv->properties = g_new0 (GValue, 2); - g_value_init (&skeleton->priv->properties[0], G_TYPE_BOOLEAN); - g_value_init (&skeleton->priv->properties[1], G_TYPE_BOOLEAN); -} - -static gboolean -whoopsie_preferences_skeleton_get_report_crashes (WhoopsiePreferences *object) -{ - WhoopsiePreferencesSkeleton *skeleton = WHOOPSIE_PREFERENCES_SKELETON (object); - gboolean value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_boolean (&(skeleton->priv->properties[0])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static gboolean -whoopsie_preferences_skeleton_get_report_metrics (WhoopsiePreferences *object) -{ - WhoopsiePreferencesSkeleton *skeleton = WHOOPSIE_PREFERENCES_SKELETON (object); - gboolean value; - g_mutex_lock (&skeleton->priv->lock); - value = g_value_get_boolean (&(skeleton->priv->properties[1])); - g_mutex_unlock (&skeleton->priv->lock); - return value; -} - -static void -whoopsie_preferences_skeleton_class_init (WhoopsiePreferencesSkeletonClass *klass) -{ - GObjectClass *gobject_class; - GDBusInterfaceSkeletonClass *skeleton_class; - - gobject_class = G_OBJECT_CLASS (klass); - gobject_class->finalize = whoopsie_preferences_skeleton_finalize; - gobject_class->get_property = whoopsie_preferences_skeleton_get_property; - gobject_class->set_property = whoopsie_preferences_skeleton_set_property; - gobject_class->notify = whoopsie_preferences_skeleton_notify; - - - whoopsie_preferences_override_properties (gobject_class, 1); - - skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass); - skeleton_class->get_info = whoopsie_preferences_skeleton_dbus_interface_get_info; - skeleton_class->get_properties = whoopsie_preferences_skeleton_dbus_interface_get_properties; - skeleton_class->flush = whoopsie_preferences_skeleton_dbus_interface_flush; - skeleton_class->get_vtable = whoopsie_preferences_skeleton_dbus_interface_get_vtable; -} - -static void -whoopsie_preferences_skeleton_iface_init (WhoopsiePreferencesIface *iface) -{ - iface->get_report_crashes = whoopsie_preferences_skeleton_get_report_crashes; - iface->get_report_metrics = whoopsie_preferences_skeleton_get_report_metrics; -} - -/** - * whoopsie_preferences_skeleton_new: - * - * Creates a skeleton object for the D-Bus interface com.ubuntu.WhoopsiePreferences. - * - * Returns: (transfer full) (type WhoopsiePreferencesSkeleton): The skeleton object. - */ -WhoopsiePreferences * -whoopsie_preferences_skeleton_new (void) -{ - return WHOOPSIE_PREFERENCES (g_object_new (TYPE_WHOOPSIE_PREFERENCES_SKELETON, NULL)); -} - Index: b/src/diagnostics/whoopsie-generated.h =================================================================== --- a/src/diagnostics/whoopsie-generated.h +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Generated by gdbus-codegen 2.37.4. DO NOT EDIT. - * - * The license of this code is the same as for the source it was derived from. - */ - -#ifndef __WHOOPSIE_GENERATED_H__ -#define __WHOOPSIE_GENERATED_H__ - -#include - -G_BEGIN_DECLS - - -/* ------------------------------------------------------------------------ */ -/* Declarations for com.ubuntu.WhoopsiePreferences */ - -#define TYPE_WHOOPSIE_PREFERENCES (whoopsie_preferences_get_type ()) -#define WHOOPSIE_PREFERENCES(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_WHOOPSIE_PREFERENCES, WhoopsiePreferences)) -#define IS_WHOOPSIE_PREFERENCES(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_WHOOPSIE_PREFERENCES)) -#define WHOOPSIE_PREFERENCES_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_WHOOPSIE_PREFERENCES, WhoopsiePreferencesIface)) - -struct _WhoopsiePreferences; -typedef struct _WhoopsiePreferences WhoopsiePreferences; -typedef struct _WhoopsiePreferencesIface WhoopsiePreferencesIface; - -struct _WhoopsiePreferencesIface -{ - GTypeInterface parent_iface; - - - gboolean (*handle_get_identifier) ( - WhoopsiePreferences *object, - GDBusMethodInvocation *invocation); - - gboolean (*handle_set_report_crashes) ( - WhoopsiePreferences *object, - GDBusMethodInvocation *invocation, - gboolean arg_report); - - gboolean (*handle_set_report_metrics) ( - WhoopsiePreferences *object, - GDBusMethodInvocation *invocation, - gboolean arg_report); - - gboolean (*get_report_crashes) (WhoopsiePreferences *object); - - gboolean (*get_report_metrics) (WhoopsiePreferences *object); - -}; - -GType whoopsie_preferences_get_type (void) G_GNUC_CONST; - -GDBusInterfaceInfo *whoopsie_preferences_interface_info (void); -guint whoopsie_preferences_override_properties (GObjectClass *klass, guint property_id_begin); - - -/* D-Bus method call completion functions: */ -void whoopsie_preferences_complete_set_report_crashes ( - WhoopsiePreferences *object, - GDBusMethodInvocation *invocation); - -void whoopsie_preferences_complete_set_report_metrics ( - WhoopsiePreferences *object, - GDBusMethodInvocation *invocation); - -void whoopsie_preferences_complete_get_identifier ( - WhoopsiePreferences *object, - GDBusMethodInvocation *invocation, - const gchar *identifier); - - - -/* D-Bus method calls: */ -void whoopsie_preferences_call_set_report_crashes ( - WhoopsiePreferences *proxy, - gboolean arg_report, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean whoopsie_preferences_call_set_report_crashes_finish ( - WhoopsiePreferences *proxy, - GAsyncResult *res, - GError **error); - -gboolean whoopsie_preferences_call_set_report_crashes_sync ( - WhoopsiePreferences *proxy, - gboolean arg_report, - GCancellable *cancellable, - GError **error); - -void whoopsie_preferences_call_set_report_metrics ( - WhoopsiePreferences *proxy, - gboolean arg_report, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean whoopsie_preferences_call_set_report_metrics_finish ( - WhoopsiePreferences *proxy, - GAsyncResult *res, - GError **error); - -gboolean whoopsie_preferences_call_set_report_metrics_sync ( - WhoopsiePreferences *proxy, - gboolean arg_report, - GCancellable *cancellable, - GError **error); - -void whoopsie_preferences_call_get_identifier ( - WhoopsiePreferences *proxy, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean whoopsie_preferences_call_get_identifier_finish ( - WhoopsiePreferences *proxy, - gchar **out_identifier, - GAsyncResult *res, - GError **error); - -gboolean whoopsie_preferences_call_get_identifier_sync ( - WhoopsiePreferences *proxy, - gchar **out_identifier, - GCancellable *cancellable, - GError **error); - - - -/* D-Bus property accessors: */ -gboolean whoopsie_preferences_get_report_crashes (WhoopsiePreferences *object); -void whoopsie_preferences_set_report_crashes (WhoopsiePreferences *object, gboolean value); - -gboolean whoopsie_preferences_get_report_metrics (WhoopsiePreferences *object); -void whoopsie_preferences_set_report_metrics (WhoopsiePreferences *object, gboolean value); - - -/* ---- */ - -#define TYPE_WHOOPSIE_PREFERENCES_PROXY (whoopsie_preferences_proxy_get_type ()) -#define WHOOPSIE_PREFERENCES_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_WHOOPSIE_PREFERENCES_PROXY, WhoopsiePreferencesProxy)) -#define WHOOPSIE_PREFERENCES_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_WHOOPSIE_PREFERENCES_PROXY, WhoopsiePreferencesProxyClass)) -#define WHOOPSIE_PREFERENCES_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_WHOOPSIE_PREFERENCES_PROXY, WhoopsiePreferencesProxyClass)) -#define IS_WHOOPSIE_PREFERENCES_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_WHOOPSIE_PREFERENCES_PROXY)) -#define IS_WHOOPSIE_PREFERENCES_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_WHOOPSIE_PREFERENCES_PROXY)) - -typedef struct _WhoopsiePreferencesProxy WhoopsiePreferencesProxy; -typedef struct _WhoopsiePreferencesProxyClass WhoopsiePreferencesProxyClass; -typedef struct _WhoopsiePreferencesProxyPrivate WhoopsiePreferencesProxyPrivate; - -struct _WhoopsiePreferencesProxy -{ - /*< private >*/ - GDBusProxy parent_instance; - WhoopsiePreferencesProxyPrivate *priv; -}; - -struct _WhoopsiePreferencesProxyClass -{ - GDBusProxyClass parent_class; -}; - -GType whoopsie_preferences_proxy_get_type (void) G_GNUC_CONST; - -void whoopsie_preferences_proxy_new ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -WhoopsiePreferences *whoopsie_preferences_proxy_new_finish ( - GAsyncResult *res, - GError **error); -WhoopsiePreferences *whoopsie_preferences_proxy_new_sync ( - GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error); - -void whoopsie_preferences_proxy_new_for_bus ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -WhoopsiePreferences *whoopsie_preferences_proxy_new_for_bus_finish ( - GAsyncResult *res, - GError **error); -WhoopsiePreferences *whoopsie_preferences_proxy_new_for_bus_sync ( - GBusType bus_type, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error); - - -/* ---- */ - -#define TYPE_WHOOPSIE_PREFERENCES_SKELETON (whoopsie_preferences_skeleton_get_type ()) -#define WHOOPSIE_PREFERENCES_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_WHOOPSIE_PREFERENCES_SKELETON, WhoopsiePreferencesSkeleton)) -#define WHOOPSIE_PREFERENCES_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_WHOOPSIE_PREFERENCES_SKELETON, WhoopsiePreferencesSkeletonClass)) -#define WHOOPSIE_PREFERENCES_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_WHOOPSIE_PREFERENCES_SKELETON, WhoopsiePreferencesSkeletonClass)) -#define IS_WHOOPSIE_PREFERENCES_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_WHOOPSIE_PREFERENCES_SKELETON)) -#define IS_WHOOPSIE_PREFERENCES_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_WHOOPSIE_PREFERENCES_SKELETON)) - -typedef struct _WhoopsiePreferencesSkeleton WhoopsiePreferencesSkeleton; -typedef struct _WhoopsiePreferencesSkeletonClass WhoopsiePreferencesSkeletonClass; -typedef struct _WhoopsiePreferencesSkeletonPrivate WhoopsiePreferencesSkeletonPrivate; - -struct _WhoopsiePreferencesSkeleton -{ - /*< private >*/ - GDBusInterfaceSkeleton parent_instance; - WhoopsiePreferencesSkeletonPrivate *priv; -}; - -struct _WhoopsiePreferencesSkeletonClass -{ - GDBusInterfaceSkeletonClass parent_class; -}; - -GType whoopsie_preferences_skeleton_get_type (void) G_GNUC_CONST; - -WhoopsiePreferences *whoopsie_preferences_skeleton_new (void); - - -G_END_DECLS - -#endif /* __WHOOPSIE_GENERATED_H__ */ Index: b/src/diagnostics/whoopsie.ui =================================================================== --- a/src/diagnostics/whoopsie.ui +++ /dev/null @@ -1,284 +0,0 @@ - - - - - False - False - - - True - False - 12 - vertical - 12 - - - True - False - vertical - 12 - - - True - False - 0 - Ubuntu can collect anonymous information that helps developers improve it. All information collected is covered by our privacy policy. - True - - - False - True - 0 - - - - - True - False - 0 - 0 - - - Privacy Policy - False - True - True - True - False - - - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - vertical - 12 - - - True - False - - - True - False - People using this computer can: - - - False - True - 0 - - - - - True - False - 1 - 0 - - - - - - True - True - 1 - - - - - False - True - 0 - - - - - True - False - vertical - 3 - - - Send error reports to Canonical - False - True - True - False - False - 0 - True - - - False - True - 0 - - - - - True - False - 24 - - - True - False - vertical - 12 - - - True - False - 0 - <small>Error reports include information about what a program was doing when it failed. You always have the choice to send or cancel an error report.</small> - True - True - - - False - True - 0 - - - - - True - False - vertical - 3 - - - Send a report automatically if a problem prevents login - False - False - False - False - False - False - 0 - True - - - False - True - 0 - - - - - True - False - 0 - 0 - - - Show Previous Reports - False - True - True - True - False - - - - - False - True - 1 - - - - - False - True - 1 - - - - - - - False - True - 1 - - - - - False - True - 1 - - - - - True - False - vertical - 3 - - - Send occasional system information to Canonical - False - True - True - False - False - 0 - True - - - False - True - 0 - - - - - True - False - 0 - 24 - <small>This includes things like how many programs are running, how much disk space the computer has, and what devices are connected.</small> - True - True - - - False - True - 1 - - - - - False - True - 2 - - - - - False - True - 1 - - - - - - debian/patches/14_seconds_combo.patch0000664000000000000000000000455312323111231014755 0ustar Description: Unify the options between the 'brightness and lock' panel in g-c-c and alm and make them translatable Author: Iain Lane Index: b/src/security-widget.vala =================================================================== --- a/src/security-widget.vala +++ b/src/security-widget.vala @@ -37,28 +37,41 @@ this.set_up_ui (); } + private string get_time(int seconds) { + if (seconds >= 3600) { + int hours = seconds / 3600; + return ngettext("%u hour", "%u hours", hours).printf(hours); + } else if (seconds >= 60) { + int minutes = seconds / 60; + return ngettext("%u minute", "%u minutes", minutes).printf(minutes); + } else { + return ngettext("%u second", "%u seconds", seconds).printf(seconds); + } + } + private void set_up_ui () { var liststore_delay = new ListStore (2, typeof (string), typeof (int)); TreeIter iter; liststore_delay.append (out iter); - liststore_delay.set (iter, 0, "1 second", 1, 0); + liststore_delay.set (iter, 0, ngettext("0 second (lock immediately)", + "0 seconds (lock immediately)", 0), 1, 0); liststore_delay.append (out iter); - liststore_delay.set (iter, 0, "30 seconds", 1, 30); + liststore_delay.set (iter, 0, get_time(30), 1, 30); liststore_delay.append (out iter); - liststore_delay.set (iter, 0, "1 minute", 1, 60); + liststore_delay.set (iter, 0, get_time(60), 1, 60); liststore_delay.append (out iter); - liststore_delay.set (iter, 0, "2 minutes", 1, 120); + liststore_delay.set (iter, 0, get_time(120), 1, 120); liststore_delay.append (out iter); - liststore_delay.set (iter, 0, "3 minutes", 1, 180); + liststore_delay.set (iter, 0, get_time(180), 1, 180); liststore_delay.append (out iter); - liststore_delay.set (iter, 0, "5 minutes", 1, 300); + liststore_delay.set (iter, 0, get_time(300), 1, 300); liststore_delay.append (out iter); - liststore_delay.set (iter, 0, "10 minutes", 1, 600); + liststore_delay.set (iter, 0, get_time(600), 1, 600); liststore_delay.append (out iter); - liststore_delay.set (iter, 0, "30 minutes", 1, 1800); + liststore_delay.set (iter, 0, get_time(1800), 1, 1800); liststore_delay.append (out iter); - liststore_delay.set (iter, 0, "1 hour", 1, 3600); + liststore_delay.set (iter, 0, get_time(3600), 1, 3600); var grid = new Grid(); grid.set_halign(Align.START); debian/watch0000664000000000000000000000022612323111231010206 0ustar version=3 https://launchpad.net/activity-log-manager/+download \ https://launchpad.net/activity-log-manager/.*/.*/activity-log-manager-(.+)\.tar\.xz debian/copyright0000664000000000000000000000237612323111231011120 0ustar Format: http://dep.debian.net/deps/dep5/ Upstream-name: GNOME Activity Journal Upstream-contact: GNOME Activity Journal Developer Team Source: https://launchpad.net/gnome-activity-journal/+download Files: * Copyright: © 2012, Seif Lotfy 2012, Stefano Candori 2012, Manish Sinha 2011 Collabora Ltd. License: LGPL-2+ Files: debian/* Copyright: © 2010-2011, Siegfried-Angel Gevatter Pujals © 2011, Collabora Ltd. @ 2012, Canonical Ltd. License: LGPL-2+ License: LGPL-2+ alm is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. . alm is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. . On Debian systems, the complete text of the GNU Lesser General Public License can be found in `/usr/share/common-licenses/LGPL-2.1'