Merge lp:~jbicha/activity-log-manager/search-and-security-only-for-ccpanel into lp:activity-log-manager

Proposed by Jeremy Bícha
Status: Merged
Merged at revision: 80
Proposed branch: lp:~jbicha/activity-log-manager/search-and-security-only-for-ccpanel
Merge into: lp:activity-log-manager
Diff against target: 100 lines (+14/-18)
3 files modified
src/Makefile.am (+2/-2)
src/activity-log-manager.vala (+3/-16)
src/alm-cc.c (+9/-0)
To merge this branch: bzr merge lp:~jbicha/activity-log-manager/search-and-security-only-for-ccpanel
Reviewer Review Type Date Requested Status
Manish Sinha (मनीष सिन्हा) Approve
Review via email: mp+174119@code.launchpad.net

Description of the change

This way other distros don't have to depend on accountsservice if we add the remaining proposed items to the Security tab for instance.

To post a comment you must log in.
80. By Jeremy Bícha

fix warning

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

Looks like there is some issue. Install it and run it with gdb
> gdb gnome-control-center

System Settings open, click on Privacy and the whole UI freezes. Then after sometime, this error appears

Program received signal SIGTRAP, Trace/breakpoint trap.
0xb7650919 in g_logv (log_domain=log_domain@entry=0xb7882798 "GLib-GIO", log_level=<optimized out>, log_level@entry=G_LOG_LEVEL_ERROR,
    format=format@entry=0xb789cd5c "Settings schema '%s' does not contain a key named '%s'", args=args@entry=0xbfffdabc "\b\270\071\200\331\351", <incomplete sequence \364\265>)
    at gmessages.c:989
989 G_BREAKPOINT ();
(gdb) bt
#0 0xb7650919 in g_logv (log_domain=log_domain@entry=0xb7882798 "GLib-GIO", log_level=<optimized out>, log_level@entry=G_LOG_LEVEL_ERROR,
    format=format@entry=0xb789cd5c "Settings schema '%s' does not contain a key named '%s'", args=args@entry=0xbfffdabc "\b\270\071\200\331\351", <incomplete sequence \364\265>)
    at gmessages.c:989
#1 0xb7650a23 in g_log (log_domain=log_domain@entry=0xb7882798 "GLib-GIO", log_level=log_level@entry=G_LOG_LEVEL_ERROR,
    format=format@entry=0xb789cd5c "Settings schema '%s' does not contain a key named '%s'") at gmessages.c:1025
#2 0xb7834730 in g_settings_schema_get_value (schema=schema@entry=0x9070e660, key=key@entry=0xb5f4e9d9 "ubuntu-lock-on-suspend") at gsettingsschema.c:640
#3 0xb78348e8 in g_settings_schema_key_init (key=<optimized out>, key@entry=0x80355cb0, schema=<optimized out>, name=<optimized out>, name@entry=0xb5f4e9d9 "ubuntu-lock-on-suspend")
    at gsettingsschema.c:751
#4 0xb783a3c8 in g_settings_bind_with_mapping (settings=settings@entry=0x802f2090, key=key@entry=0xb5f4e9d9 "ubuntu-lock-on-suspend", object=object@entry=0x80347af8,
    property=property@entry=0xb5f4e654 "active", flags=G_SETTINGS_BIND_DEFAULT, get_mapping=0x0, set_mapping=0x0, user_data=user_data@entry=0x0, destroy=destroy@entry=0x0) at gsettings.c:2599
#5 0xb783a8e6 in g_settings_bind (settings=0x802f2090, key=key@entry=0xb5f4e9d9 "ubuntu-lock-on-suspend", object=object@entry=0x80347af8, property=property@entry=0xb5f4e654 "active",
    flags=<optimized out>, flags@entry=G_SETTINGS_BIND_DEFAULT) at gsettings.c:2543
#6 0xb5f35dce in alm_security_widget_set_up_ui (self=self@entry=0x8006bd38) at security-widget.c:406
#7 0xb5f364db in alm_security_widget_construct (object_type=2151247960) at security-widget.c:110
#8 0xb5f3658c in alm_security_widget_new () at security-widget.c:116
#9 0xb5f4ab97 in alm_main_window_panel_init (self=0x803018b8) at alm-cc.c:72

review: Needs Fixing
Revision history for this message
Jeremy Bícha (jbicha) wrote :
Download full text (3.7 KiB)

I can't duplicate that problem and I don't think this merge proposal makes many changes to the code. Which version of gnome-screensaver do you have installed? Because your gdb output seems to say something about a missing ubuntu-lock-on-suspend gsettings key? I've never really learned how to use gdb though.

$ XDG_CURRENT_DESKTOP=Unity gdb gnome-control-center
GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/gnome-control-center...(no debugging symbols found)...done.
(gdb) start
Temporary breakpoint 1 at 0x71c0
Starting program: /usr/bin/gnome-control-center
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Temporary breakpoint 1, 0x000055555555b1c0 in main ()
(gdb) step
Single stepping until exit from function main,
which has no line number information.
[New Thread 0x7fffeedc7700 (LWP 22969)]
[New Thread 0x7fffb30c5700 (LWP 22970)]
[New Thread 0x7fffb28c4700 (LWP 22971)]
[New Thread 0x7fffb1c22700 (LWP 22973)]
[Thread 0x7fffb28c4700 (LWP 22971) exited]
[New Thread 0x7fffb28c4700 (LWP 22998)]
[New Thread 0x7fffb1421700 (LWP 22999)]
[New Thread 0x7fffb0c20700 (LWP 23000)]
[New Thread 0x7fffa3fff700 (LWP 23001)]

** (gnome-control-center:22938): CRITICAL **: gee_abstract_map_set: assertion 'self != NULL' failed

** (gnome-control-center:22938): CRITICAL **: gee_abstract_map_set: assertion 'self != NULL' failed

** (gnome-control-center:22938): CRITICAL **: gee_abstract_map_set: assertion 'self != NULL' failed

** (gnome-control-center:22938): CRITICAL **: gee_abstract_map_set: assertion 'self != NULL' failed

** (gnome-control-center:22938): CRITICAL **: gee_abstract_map_set: assertion 'self != NULL' failed

** (gnome-control-center:22938): CRITICAL **: gee_abstract_map_set: assertion 'self != NULL' failed

** (gnome-control-center:22938): CRITICAL **: gee_abstract_map_set: assertion 'self != NULL' failed

** (gnome-control-center:22938): CRITICAL **: gee_abstract_map_set: assertion 'self != NULL' failed
[New Thread 0x7fffa37fe700 (LWP 23002)]
[New Thread 0x7fffa2ffd700 (LWP 23003)]
[New Thread 0x7fffa27fc700 (LWP 23004)]
[New Thread 0x7fffa1ffb700 (LWP 23005)]

** (gnome-control-center:22938): CRITICAL **: gee_abstract_map_has_key: assertion 'self != NULL' failed

** (gnome-control-center:22938): CRITICAL **: gee_abstract_map_has_key: assertion 'self != NULL' failed

** (gnome-control-center:22938): CRITICAL **: gee_abstract_map_has_key: assertion 'self != NULL' failed

** (gnome-control-center:22938): CRITICAL **: gee_abstract_map_has_key: assertion 'self != NULL' failed
Error setting crash reporting: GDBus.Error:org.freedesktop.DBus.Error.AuthFailed: Not authorized.
Error setting metrics reporting: GDBus.Error:org.freed...

Read more...

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

Yes, it looks like the problem is on my side. I don't have "org.gnome.desktop.screensaver" in my gsettings.

review: Approve
Revision history for this message
Jeremy Bícha (jbicha) wrote :

Oh, Ubuntu GNOME 13.10 doesn't install gnome-screensaver by default since Ubuntu GNOME doesn't actually use it.

Unity does recommend indicator-session which recommends gnome-screensaver but that's not a hard dependency
(perhaps so that users can replace it with xscreensaver or whatever).

We need to figure out a way to test whether a gsettings key exists before trying to load it (see bug 1195481 for another example of this kind of bug).

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

Oh yeah. That might be a problem. I am running Ubuntu GNOME

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Makefile.am'
2--- src/Makefile.am 2013-07-09 01:34:49 +0000
3+++ src/Makefile.am 2013-07-11 20:46:25 +0000
4@@ -24,8 +24,6 @@
5 SHARED_SOURCES = \
6 blacklist-dbus.vala \
7 activity-log-manager.vala \
8- searchresults-widget.vala \
9- security-widget.vala \
10 unified-privacy-files.vala \
11 unified-privacy-applications.vala \
12 unified-privacy-history.vala \
13@@ -108,6 +106,8 @@
14 endif
15
16 libactivity_log_manager_la_SOURCES = \
17+ searchresults-widget.vala \
18+ security-widget.vala \
19 $(SHARED_SOURCES:.vala=.c) \
20 alm-cc.c
21
22
23=== modified file 'src/activity-log-manager.vala'
24--- src/activity-log-manager.vala 2013-07-09 23:08:45 +0000
25+++ src/activity-log-manager.vala 2013-07-11 20:46:25 +0000
26@@ -20,7 +20,7 @@
27 * You should have received a copy of the GNU Lesser General Public License
28 * along with this program. If not, see <http://www.gnu.org/licenses/>.";
29 */
30-
31+
32 #if DIAGNOSTIC
33 extern Gtk.Widget whoopsie_daisy_preferences_new ();
34 #endif
35@@ -29,8 +29,6 @@
36
37 public class ActivityLogManager : Gtk.Box {
38 private Gtk.Notebook notebook;
39- private SecurityWidget security_widget;
40- private SearchResultsWidget searchresults_widget;
41 private PrivacyWidget privacy_widget;
42 private Gtk.Widget whoopsie;
43
44@@ -50,17 +48,6 @@
45 var privacy_label = new Gtk.Label(_("Files & Applications"));
46 notebook.append_page(privacy_widget, privacy_label);
47
48- if (GLib.Environment.get_variable ("XDG_CURRENT_DESKTOP") == "Unity")
49- {
50- security_widget = new SecurityWidget();
51- var security_label = new Gtk.Label(_("Security"));
52- notebook.prepend_page(security_widget, security_label);
53-
54- searchresults_widget = new SearchResultsWidget();
55- var searchresults_label = new Gtk.Label(_("Search"));
56- notebook.append_page(searchresults_widget, searchresults_label);
57- }
58-
59 #if DIAGNOSTIC
60 whoopsie = whoopsie_daisy_preferences_new ();
61 var whoopsie_label = new Gtk.Label(_("Diagnostics"));
62@@ -69,9 +56,9 @@
63 this.show_all();
64 }
65
66- public void append_page (Gtk.Widget widget, string label) {
67+ public void insert_page (Gtk.Widget widget, string label, int position) {
68 var app_label = new Gtk.Label(_(label));
69- notebook.append_page(widget, app_label);
70+ notebook.insert_page(widget, app_label, position);
71 }
72 }
73 }
74
75=== modified file 'src/alm-cc.c'
76--- src/alm-cc.c 2013-06-28 16:24:00 +0000
77+++ src/alm-cc.c 2013-07-11 20:46:25 +0000
78@@ -22,6 +22,9 @@
79 #include <libgnome-control-center/cc-panel.h>
80
81 extern void* alm_activity_log_manager_new (void);
82+extern void alm_activity_log_manager_insert_page (void* alm, GtkWidget* widget, const gchar* label, int position);
83+extern GtkWidget* alm_security_widget_new(void);
84+extern GtkWidget* alm_search_results_widget_new(void);
85
86 #define ALM_TYPE_MAIN_WINDOW_PANEL alm_main_window_panel_get_type()
87
88@@ -54,6 +57,12 @@
89 alm_main_window_panel_init (AlmMainWindowPanel *self)
90 {
91 GtkWidget *widget = GTK_WIDGET (alm_activity_log_manager_new ());
92+
93+ GtkWidget *security = GTK_WIDGET (alm_security_widget_new ());
94+ alm_activity_log_manager_insert_page (widget, security, _("Security"), 0);
95+ GtkWidget *search = GTK_WIDGET (alm_search_results_widget_new ());
96+ alm_activity_log_manager_insert_page (widget, search, _("Search"), 2);
97+
98 gtk_widget_show_all (widget);
99 gtk_container_add (GTK_CONTAINER (self), widget);
100 }

Subscribers

People subscribed via source and target branches