[maemo-commits] [maemo-commits] r14608 - in projects/haf/branches/hildon-control-panel/ui-less: . src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Oct 25 11:24:49 EEST 2007
Author: jobi
Date: 2007-10-25 11:24:47 +0300 (Thu, 25 Oct 2007)
New Revision: 14608

Modified:
   projects/haf/branches/hildon-control-panel/ui-less/ChangeLog
   projects/haf/branches/hildon-control-panel/ui-less/src/hcp-app-view.c
   projects/haf/branches/hildon-control-panel/ui-less/src/hcp-program.c
   projects/haf/branches/hildon-control-panel/ui-less/src/hcp-window.c
Log:

2007-10-25  Johan Bilien  <johan.bilien at nokia.com>

	* src/hcp-window.c, src/hcp-app-view.c: show internal widgets
	* src/hcp-program.c: do not show the UI on launch, until
	the top_application DBus method is called.



Modified: projects/haf/branches/hildon-control-panel/ui-less/ChangeLog
===================================================================
--- projects/haf/branches/hildon-control-panel/ui-less/ChangeLog	2007-10-25 07:31:47 UTC (rev 14607)
+++ projects/haf/branches/hildon-control-panel/ui-less/ChangeLog	2007-10-25 08:24:47 UTC (rev 14608)
@@ -1,3 +1,9 @@
+2007-10-25  Johan Bilien  <johan.bilien at nokia.com>
+
+	* src/hcp-window.c, src/hcp-app-view.c: show internal widgets
+	* src/hcp-program.c: do not show the UI on launch, until
+	the top_application DBus method is called.
+
 2007-10-01  Lucas Rocha  <lucas.rocha at nokia.com>
 
 	* configure.ac: release 2.0.0

Modified: projects/haf/branches/hildon-control-panel/ui-less/src/hcp-app-view.c
===================================================================
--- projects/haf/branches/hildon-control-panel/ui-less/src/hcp-app-view.c	2007-10-25 07:31:47 UTC (rev 14607)
+++ projects/haf/branches/hildon-control-panel/ui-less/src/hcp-app-view.c	2007-10-25 08:24:47 UTC (rev 14608)
@@ -90,6 +90,11 @@
   GtkWidget *separator_2 = gtk_hseparator_new ();
   GtkWidget *label_1 = gtk_label_new (label);
 
+  gtk_widget_show (hbox);
+  gtk_widget_show (separator_1);
+  gtk_widget_show (separator_2);
+  gtk_widget_show (label_1);
+
   gtk_widget_set_name (separator_1, "hildon-control-panel-separator");
   gtk_widget_set_name (separator_2, "hildon-control-panel-separator");
   gtk_box_pack_start (GTK_BOX(hbox), separator_1, TRUE, TRUE, 0);
@@ -248,6 +253,7 @@
     GList *focus_chain = NULL;
 
     grid = hcp_app_view_create_grid ();
+    gtk_widget_show (grid);
     store = hcp_app_view_create_store ();
  
     g_signal_connect (grid, "selection-changed",
@@ -261,6 +267,7 @@
     /* If we are creating a group with a defined name, we use
      * it in the separator */
     separator = hcp_app_view_create_separator (_(category->name));
+    gtk_widget_show (separator);
 
     /* Pack the separator and the corresponding grid to the vbox */
     gtk_box_pack_start (GTK_BOX (view), separator, FALSE, FALSE, 0);

Modified: projects/haf/branches/hildon-control-panel/ui-less/src/hcp-program.c
===================================================================
--- projects/haf/branches/hildon-control-panel/ui-less/src/hcp-program.c	2007-10-25 07:31:47 UTC (rev 14607)
+++ projects/haf/branches/hildon-control-panel/ui-less/src/hcp-program.c	2007-10-25 08:24:47 UTC (rev 14608)
@@ -53,9 +53,7 @@
 static void
 hcp_program_show_window (HCPProgram *program)
 {
-  program->window = hcp_window_new ();
-
-  gtk_widget_show_all (program->window);
+  gtk_widget_show (program->window);
 }
 
 static gint 
@@ -169,7 +167,7 @@
   }
   else if ((!strcmp (method, HCP_RPC_METHOD_TOP_APPLICATION)))
   {
-    if (!program->window)
+    if (!GTK_WIDGET_VISIBLE (program->window))
       hcp_program_show_window (program);
     else
       gtk_window_present (GTK_WINDOW (program->window));
@@ -287,23 +285,9 @@
 void
 hcp_program_run (HCPProgram *program)
 {
-  gboolean dbus_activated;
-
   g_return_if_fail (program);
   g_return_if_fail (HCP_IS_PROGRAM (program));
 
-  dbus_activated = g_getenv ("DBUS_STARTER_BUS_TYPE")?TRUE:FALSE;
+  program->window = hcp_window_new ();
 
-#if 0
-  if (!dbus_activated)
-  {
-    /* When started from the command line we show the UI as default
-     * behavior. When dbus activated, we wait to see if we got
-     * top_application or run_applet method call */
-    hcp_program_show_window (hcp);
-  }
-#endif
-
-  /* Always start the user interface for now */
-  hcp_program_show_window (program);
 }

Modified: projects/haf/branches/hildon-control-panel/ui-less/src/hcp-window.c
===================================================================
--- projects/haf/branches/hildon-control-panel/ui-less/src/hcp-window.c	2007-10-25 07:31:47 UTC (rev 14607)
+++ projects/haf/branches/hildon-control-panel/ui-less/src/hcp-window.c	2007-10-25 08:24:47 UTC (rev 14608)
@@ -877,6 +877,7 @@
   scrolled_window = g_object_new (GTK_TYPE_SCROLLED_WINDOW,
                                   "vscrollbar-policy", GTK_POLICY_ALWAYS,
                                   "hscrollbar-policy", GTK_POLICY_NEVER,
+                                  "visible", TRUE,
                                   NULL);
 
   gtk_container_add (GTK_CONTAINER (window), scrolled_window);
@@ -909,6 +910,7 @@
     priv->view = hcp_app_view_new (HCP_ICON_SIZE_SMALL);
   else
     priv->view = hcp_app_view_new (HCP_ICON_SIZE_LARGE);
+  gtk_widget_show (priv->view);
 
   g_signal_connect (G_OBJECT (priv->view), "focus-changed",
                     G_CALLBACK (hcp_window_app_view_focus_cb), window);


More information about the maemo-commits mailing list