← Back to team overview

zeitgeist team mailing list archive

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

 

Jeremy Bicha has proposed merging lp:~jbicha/activity-log-manager/search-and-security-only-for-ccpanel into lp:activity-log-manager.

Requested reviews:
  Activity Log Manager (activity-log-manager)

For more details, see:
https://code.launchpad.net/~jbicha/activity-log-manager/search-and-security-only-for-ccpanel/+merge/174119

This way other distros don't have to depend on accountsservice if we add the remaining proposed items to the Security tab for instance.
-- 
https://code.launchpad.net/~jbicha/activity-log-manager/search-and-security-only-for-ccpanel/+merge/174119
Your team Activity Log Manager is requested to review the proposed merge of lp:~jbicha/activity-log-manager/search-and-security-only-for-ccpanel into lp:activity-log-manager.
=== modified file 'src/Makefile.am'
--- src/Makefile.am	2013-07-09 01:34:49 +0000
+++ src/Makefile.am	2013-07-11 06:45:38 +0000
@@ -24,8 +24,6 @@
 SHARED_SOURCES = \
 	blacklist-dbus.vala \
 	activity-log-manager.vala \
-	searchresults-widget.vala \
-	security-widget.vala \
         unified-privacy-files.vala \
         unified-privacy-applications.vala \
         unified-privacy-history.vala \
@@ -108,6 +106,8 @@
 endif
 
 libactivity_log_manager_la_SOURCES = \
+	searchresults-widget.vala \
+	security-widget.vala \
 	$(SHARED_SOURCES:.vala=.c) \
 	alm-cc.c
 

=== modified file 'src/activity-log-manager.vala'
--- src/activity-log-manager.vala	2013-07-09 23:08:45 +0000
+++ src/activity-log-manager.vala	2013-07-11 06:45:38 +0000
@@ -20,7 +20,7 @@
  * You should have received a copy of the GNU Lesser General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.";
  */
- 
+
 #if DIAGNOSTIC
 extern Gtk.Widget whoopsie_daisy_preferences_new ();
 #endif
@@ -29,8 +29,6 @@
 
 	public class ActivityLogManager : Gtk.Box {
 		private Gtk.Notebook notebook;
-		private SecurityWidget security_widget;
-		private SearchResultsWidget searchresults_widget;
 		private PrivacyWidget privacy_widget;
 		private Gtk.Widget whoopsie;
 
@@ -50,17 +48,6 @@
 			var privacy_label = new Gtk.Label(_("Files & Applications"));
 			notebook.append_page(privacy_widget, privacy_label);
 
-			if (GLib.Environment.get_variable ("XDG_CURRENT_DESKTOP") == "Unity")
-			{
-				security_widget = new SecurityWidget();
-				var security_label = new Gtk.Label(_("Security"));
-				notebook.prepend_page(security_widget, security_label);
-
-				searchresults_widget = new SearchResultsWidget();
-				var searchresults_label = new Gtk.Label(_("Search"));
-				notebook.append_page(searchresults_widget, searchresults_label);
-			}
-
 #if DIAGNOSTIC
 			whoopsie = whoopsie_daisy_preferences_new ();
 			var whoopsie_label = new Gtk.Label(_("Diagnostics"));
@@ -69,9 +56,9 @@
 			this.show_all();
 		}
 
-		public void append_page (Gtk.Widget widget, string label) {
+		public void insert_page (Gtk.Widget widget, string label, int position) {
 			var app_label = new Gtk.Label(_(label));
-			notebook.append_page(widget, app_label);
+			notebook.insert_page(widget, app_label, position);
 		}
 	}
 }

=== modified file 'src/alm-cc.c'
--- src/alm-cc.c	2013-06-28 16:24:00 +0000
+++ src/alm-cc.c	2013-07-11 06:45:38 +0000
@@ -22,6 +22,9 @@
 #include <libgnome-control-center/cc-panel.h>
 
 extern void* alm_activity_log_manager_new (void);
+extern void alm_activity_log_manager_insert_page (void* alm, GtkWidget* widget, const gchar* label, const int* position);
+extern GtkWidget* alm_security_widget_new(void);
+extern GtkWidget* alm_search_results_widget_new(void);
 
 #define ALM_TYPE_MAIN_WINDOW_PANEL alm_main_window_panel_get_type()
 
@@ -54,6 +57,12 @@
 alm_main_window_panel_init (AlmMainWindowPanel *self)
 {
   GtkWidget *widget = GTK_WIDGET (alm_activity_log_manager_new ());
+
+  GtkWidget *security = GTK_WIDGET (alm_security_widget_new ());
+  alm_activity_log_manager_insert_page (widget, security, _("Security"), 0);
+  GtkWidget *search = GTK_WIDGET (alm_search_results_widget_new ());
+  alm_activity_log_manager_insert_page (widget, search, _("Search"), 2);
+
   gtk_widget_show_all (widget);
   gtk_container_add (GTK_CONTAINER (self), widget);
 }


Follow ups