[maemo-commits] [maemo-commits] r16980 - in projects/haf/trunk/hildon-control-panel: . src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Dec 16 15:50:46 EET 2008
Author: paradi
Date: 2008-12-16 15:50:44 +0200 (Tue, 16 Dec 2008)
New Revision: 16980

Modified:
   projects/haf/trunk/hildon-control-panel/ChangeLog
   projects/haf/trunk/hildon-control-panel/src/hcp-app-list.c
   projects/haf/trunk/hildon-control-panel/src/hcp-window.c
Log:
* removed help from menu
* hack for sharing accounts applet
* updated changelog


Modified: projects/haf/trunk/hildon-control-panel/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-control-panel/ChangeLog	2008-12-16 12:39:18 UTC (rev 16979)
+++ projects/haf/trunk/hildon-control-panel/ChangeLog	2008-12-16 13:50:44 UTC (rev 16980)
@@ -2,6 +2,15 @@
 
 	Release 2.2.3
 
+2008-12-16 Peter Aradi <peter.aradi at blumsoft.eu>
+	* src/hcp-app-list.c:
+	logical ids -> UI strings XMAS hack
+	old icons -> new icons XMAS hack
+	* src/hcp-main.c:
+	Icon initialization
+	* src/hcp-window.c:
+	removed help from menu, according to UI spec
+	
 2008-12-03 Peter Aradi <peter.aradi at blumsoft.eu>
 
 	* src/hcp-grid.c:

Modified: projects/haf/trunk/hildon-control-panel/src/hcp-app-list.c
===================================================================
--- projects/haf/trunk/hildon-control-panel/src/hcp-app-list.c	2008-12-16 12:39:18 UTC (rev 16979)
+++ projects/haf/trunk/hildon-control-panel/src/hcp-app-list.c	2008-12-16 13:50:44 UTC (rev 16980)
@@ -77,7 +77,12 @@
 #define XMAS 1
 
 #ifdef XMAS
+/* A collection of dirty, ugly, primitive hacks for emergency */
+/* TODO fix this mess by filing bugs to all applet developers */
+/* and removing this */
 
+static int sharing_accounts = -1;
+
 typedef enum {
  NAMES,
  ICONS
@@ -155,6 +160,7 @@
 "qgn_list_cp_tana",
 "qgn_stat_fm_transmitter",
 "qgn_list_cp_peninput",
+"qgn_list_cp_fmtx",
 NULL
 };
 
@@ -180,6 +186,7 @@
  "control_tv_out",
  "general_fm_transmitter",	
  "control_pen_input",
+ "general_fm_transmitter",
  NULL
 };
 
@@ -200,27 +207,42 @@
       p_trans = hcp_icon_names_new;
       break;
     default:
-      return name_read;
+      return g_strdup (name_read);
       break;
   }
-/*
-    for(i=0; hcp_logical_ids[i]; i++)
-    {
-      if (!g_strcmp0 (name_read, hcp_logical_ids[i]))
-      {
-        return (hcp_ui_strings[i]);
-      }
-    }
-*/
+
+  /* Sharing doesn't have an icon yet TODO file bug against UI spec. */
+  if (sharing_accounts !=-1){
+  if (!g_strcmp0 (name_read, "qgn_list_cp_accounts") \
+      && type == ICONS)
+  {
+     sharing_accounts = -1;
+     return g_strdup ("general_web");
+  }
+  } 
   for (i=0; p[i]; i++)
   {
       if (!g_strcmp0 (name_read, p[i]))
       {
-        return (p_trans[i]);
+        if (sharing_accounts == -1) {
+          if (!g_strcmp0 (name_read, "Sharing accounts"))
+            sharing_accounts=i;
+        }
+        return g_strdup(p_trans[i]);
       }
   }
 
-  return name_read;
+  if (!g_strcmp0 (name_read, "conn_ti_cellular_cpa"))
+  {
+    return g_strdup (dgettext("osso-connectivity-ui", "conn_ti_phone_cpa"));
+  }
+
+  if (!g_strcmp0 (name_read, "pres_ap_feature_name"))
+  {
+    return g_strdup (dgettext("osso-statusbar-presence", "pres_ap_feature_name"));
+  }
+
+  return g_strdup (name_read);
 }
 #endif
 static gboolean 
@@ -657,9 +679,9 @@
   
     g_hash_table_insert (priv->apps, g_strdup (plugin), app);
 
-/*    g_free (name); */
+    g_free (name);
     g_free (plugin);
-/*    g_free (icon); */
+    g_free (icon);
     g_free (category);
     g_free (text_domain);
   }

Modified: projects/haf/trunk/hildon-control-panel/src/hcp-window.c
===================================================================
--- projects/haf/trunk/hildon-control-panel/src/hcp-window.c	2008-12-16 12:39:18 UTC (rev 16979)
+++ projects/haf/trunk/hildon-control-panel/src/hcp-window.c	2008-12-16 13:50:44 UTC (rev 16980)
@@ -380,38 +380,6 @@
   return FALSE;
 }
 
-static void 
-hcp_window_launch_help (GtkWidget *widget, HCPWindow *window)
-{
-  HCPProgram *program = hcp_program_get_instance (); 
-  osso_return_t help_ret;
-  
-  help_ret = hildon_help_show (program->osso, 
-                               HCP_OSSO_HELP_ID, 0);
-
-  switch (help_ret)
-  {
-    case OSSO_OK:
-      break;
-
-    case OSSO_ERROR:
-      g_warning ("HELP: ERROR (No help for such topic ID)\n");
-      break;
-
-    case OSSO_RPC_ERROR:
-      g_warning ("HELP: RPC ERROR (RPC failed for HelpApp/Browser)\n");
-      break;
-
-    case OSSO_INVALID:
-      g_warning ("HELP: INVALID (invalid argument)\n");
-      break;
-
-    default:
-      g_warning ("HELP: Unknown error!\n");
-      break;
-  }
-}
-
 #ifdef MAEMO_TOOLS
 static gboolean 
 hcp_window_clear_user_data (GtkWidget *widget, HCPWindow *window)
@@ -613,14 +581,6 @@
                     G_CALLBACK (hcp_window_clear_user_data), window);
 #endif
   
-  /* Help! */
-  mi = gtk_menu_item_new_with_label (HCP_MENU_HELP);
-
-  gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-
-  g_signal_connect(G_OBJECT (mi), "activate",
-                   G_CALLBACK (hcp_window_launch_help), window);
-
   gtk_widget_show_all (GTK_WIDGET (menu));
 
   /* Set the keyboard listening callback */


More information about the maemo-commits mailing list