[maemo-commits] [maemo-commits] r12652 - in projects/haf/trunk/hildon-desktop: . data libhildondesktop libhildonwm src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Jul 4 17:26:51 EEST 2007
- Previous message: [maemo-commits] r12651 - in projects/haf/trunk/hildon-desktop: . libhildondesktop
- Next message: [maemo-commits] r12653 - in projects/haf/trunk/osso-gnome-vfs2/debian: . patches
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: moimart Date: 2007-07-04 17:26:29 +0300 (Wed, 04 Jul 2007) New Revision: 12652 Modified: projects/haf/trunk/hildon-desktop/ChangeLog projects/haf/trunk/hildon-desktop/data/desktop.conf.in projects/haf/trunk/hildon-desktop/data/install_sbapplet.sh projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm-desktop.c projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm-window.c projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.h projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c projects/haf/trunk/hildon-desktop/src/hn-app-button.c projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c projects/haf/trunk/hildon-desktop/src/hn-others-button.c Log: 2007-07-04 Moises Martinez <moises.martinez at nokia.com> * data/desktop.conf.in: - Added X-Load-New-Plugins for statusbar * data/install_sbapplet.sh: - exit 0; script for backward-compatibility * libhildondesktop/hildon-desktop-panel-expandable.c: - disabled sb_debug output * libhildonwm/hd-wm-desktop.c: code cleanup. * libhildonwm/hd-wm-window.c: (hd_wm_window_close): * libhildonwm/hd-wm.[ch]: - gdk_close_all_temporary_windows is MAEMO_CHANGES - Treat menu_button as a gobject not gtkwidget. - Removed unused methods * src/hd-applications-menu.c: * src/hn-others-button.c: - Pass the menu button as a GObject. * src/hd-switcher-menu.c: * src/hn-app-switcher.c: - disabled debug output * src/hn-app-button.c: - Partially fixed size of menu_items - disabled debug ouput * ChangeLog updated. Modified: projects/haf/trunk/hildon-desktop/ChangeLog =================================================================== --- projects/haf/trunk/hildon-desktop/ChangeLog 2007-07-04 14:12:48 UTC (rev 12651) +++ projects/haf/trunk/hildon-desktop/ChangeLog 2007-07-04 14:26:29 UTC (rev 12652) @@ -1,3 +1,27 @@ +2007-07-04 Moises Martinez <moises.martinez at nokia.com> + + * data/desktop.conf.in: + - Added X-Load-New-Plugins for statusbar + * data/install_sbapplet.sh: + - exit 0; script for backward-compatibility + * libhildondesktop/hildon-desktop-panel-expandable.c: + - disabled sb_debug output + * libhildonwm/hd-wm-desktop.c: code cleanup. + * libhildonwm/hd-wm-window.c: (hd_wm_window_close): + * libhildonwm/hd-wm.[ch]: + - gdk_close_all_temporary_windows is MAEMO_CHANGES + - Treat menu_button as a gobject not gtkwidget. + - Removed unused methods + * src/hd-applications-menu.c: + * src/hn-others-button.c: + - Pass the menu button as a GObject. + * src/hd-switcher-menu.c: + * src/hn-app-switcher.c: + - disabled debug output + * src/hn-app-button.c: + - Partially fixed size of menu_items + - disabled debug ouput + 2007-07-04 Johan Bilien <johan.bilien at nokia.com> * src/hd-desktop.c: Explicitely use dgettext when translating Modified: projects/haf/trunk/hildon-desktop/data/desktop.conf.in =================================================================== --- projects/haf/trunk/hildon-desktop/data/desktop.conf.in 2007-07-04 14:12:48 UTC (rev 12651) +++ projects/haf/trunk/hildon-desktop/data/desktop.conf.in 2007-07-04 14:26:29 UTC (rev 12652) @@ -29,5 +29,6 @@ X-Size-Height=50 X-Orientation=top X-Is-Ordered=1 +X-Load-New-Plugins=1 X-Config-File=statusbar.conf X-Plugin-Dir=@hildonstatusbardesktopentrydir@ Modified: projects/haf/trunk/hildon-desktop/data/install_sbapplet.sh =================================================================== --- projects/haf/trunk/hildon-desktop/data/install_sbapplet.sh 2007-07-04 14:12:48 UTC (rev 12651) +++ projects/haf/trunk/hildon-desktop/data/install_sbapplet.sh 2007-07-04 14:26:29 UTC (rev 12652) @@ -1,51 +1,4 @@ #!/bin/sh -e # moimart -if [ ! "$#" -eq "1" ]; -then - echo "1 args required" - echo "desktopfile" - exit 1; -fi - -DESKTOP_FILE=$1 - -if [ "`uname -m`" == "armv6l" ]; -then - SB_HOME_DIR=/home/user - USER=user -else - SB_HOME_DIR=$HOME - USER=`basename $HOME` -fi - -SB_CONF=statusbar.conf -SB_USRDIRCONF=$SB_HOME_DIR/.osso/hildon-desktop/$SB_CONF -SB_SYSDIRCONF=/etc/hildon-desktop/$SB_CONF -SB_PATH=$SB_USRDIRCONF - -if [ ! -r $SB_PATH ]; -then - cp $SB_SYSDIRCONF $SB_USRDIRCONF - echo "cp $SB_SYSDIRCONF $SB_USRDIRCONF" -fi - -if [ ! -r $SB_PATH ]; -then - echo "Can't access configuration" - exit 0 -fi - -chown $USER $SB_USRDIRCONF && echo "Setting owner" - -if [ "`cat $SB_PATH|grep \"\[$DESKTOP_FILE\]\"|wc -l`" -gt "0" ]; -then - echo "Entry already configured" - echo "" >> $SB_PATH - exit 0; -fi - -echo "Creating entry..." - -echo -e "[$DESKTOP_FILE]\n\ -Mandatory=$MANDATORY\n" >> $SB_PATH +exit 0; Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c =================================================================== --- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c 2007-07-04 14:12:48 UTC (rev 12651) +++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-expandable.c 2007-07-04 14:26:29 UTC (rev 12652) @@ -40,7 +40,7 @@ #define SYSTEM_TRAY_CANCEL_MESSAGE 2 #endif -#define STATUSBAR_DEBUG 1 +#define STATUSBAR_DEBUG 0 #if (STATUSBAR_DEBUG) #define sb_debug(o,a...) g_debug("sb: " o,##a) #else Modified: projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm-desktop.c =================================================================== --- projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm-desktop.c 2007-07-04 14:12:48 UTC (rev 12651) +++ projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm-desktop.c 2007-07-04 14:26:29 UTC (rev 12652) @@ -35,7 +35,7 @@ #include <X11/Xutil.h> /* For WMHints */ #include <X11/Xatom.h> #include <gdk/gdkx.h> -#include <gtk/gtk.h> /* needed by hildon-navigator-main.h */ +#include <gtk/gtk.h> #include <glib/gi18n.h> #include "hd-wm-application.h" Modified: projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm-window.c =================================================================== --- projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm-window.c 2007-07-04 14:12:48 UTC (rev 12651) +++ projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm-window.c 2007-07-04 14:26:29 UTC (rev 12652) @@ -1204,7 +1204,6 @@ ev.xclient.format = 32; ev.xclient.data.l[0] = CurrentTime; ev.xclient.data.l[1] = GDK_WINDOW_XID (gdk_get_default_root_window ()); - /*ev.xclient.data.l[1] = GDK_WINDOW_XID(gtk_widget_get_parent_window (GTK_WIDGET (tasknav)));*/ gdk_error_trap_push(); XSendEvent (GDK_DISPLAY(), GDK_ROOT_WINDOW(), False,SubstructureRedirectMask, &ev); Modified: projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c =================================================================== --- projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c 2007-07-04 14:12:48 UTC (rev 12651) +++ projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.c 2007-07-04 14:26:29 UTC (rev 12652) @@ -215,7 +215,7 @@ GHashTable *watched_apps; - GtkWidget *all_menu; + GObject *all_menu; Window desktop_window; @@ -710,9 +710,9 @@ if (g_str_equal (HOME_LONG_PRESS, member) && !hd_wm_modal_windows_present()) { g_signal_emit_by_name (hdwm, "long-key-press"); - +#ifdef MAEMO_CHANGES gdk_close_all_temporary_windows (); - +#endif return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } @@ -1568,47 +1568,7 @@ return win; } -#if 0 static gboolean -hd_wm_lookup_window_via_menu_widget_find_func (gpointer key, - gpointer value, - gpointer user_data) -{ - HDWMWindow *win; - - win = (HDWMWindow*)value; - - if (hd_wm_window_get_menu (win) == (GtkWidget*)user_data) - return TRUE; - - return FALSE; -} - - -HDWMWindow* -hd_wm_lookup_window_via_menu_widget (GtkWidget *menu_widget) -{ - HDWMWindow *win = NULL; - - win - = g_hash_table_find (hdwm->priv->windows, - hd_wm_lookup_window_via_menu_widget_find_func, - (gpointer)menu_widget); - - if (!win) - { - /* Maybe its stored in our hibernating hash - */ - win = g_hash_table_find (hdwm->priv->windows_hibernating, - hd_wm_lookup_window_via_menu_widget_find_func, - (gpointer)menu_widget); - } - - return win; -} -#endif - -static gboolean hd_wm_lookup_application_via_service_find_func (gpointer key, gpointer value, gpointer user_data) @@ -1669,24 +1629,6 @@ (gpointer)exec_name); } -#if 0 -HDWMApplication* -hd_wm_lookup_application_via_menu (GtkWidget *menu) -{ - HDWMWindow *win; - - win = hd_wm_lookup_window_via_menu_widget (menu); - - if (!win) - win = hd_wm_lookup_window_view (menu); - - if (win) - return hd_wm_window_get_application (win); - - return NULL; -} -#endif - /* Root win property changes */ static void @@ -2201,12 +2143,12 @@ } void -hd_wm_set_all_menu_button (HDWM *hdwm, GtkWidget *widget) +hd_wm_set_all_menu_button (HDWM *hdwm, GObject *menu_button) { - g_assert (hdwm && widget); - g_assert (HD_IS_WM (hdwm) && GTK_IS_WIDGET (widget)); + g_assert (hdwm && menu_button); + g_assert (HD_IS_WM (hdwm) && G_IS_OBJECT (menu_button)); - hdwm->priv->all_menu = widget; + hdwm->priv->all_menu = menu_button; } void @@ -2340,7 +2282,7 @@ hd_wm_focus_active_window (hdwm); return; case HD_TN_ACTIVATE_ALL_MENU: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (hdwm->priv->all_menu), TRUE); + g_object_set (hdwm->priv->all_menu, "activate", TRUE, NULL); g_signal_emit_by_name (hdwm->priv->all_menu, "toggled"); break; default: Modified: projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.h =================================================================== --- projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.h 2007-07-04 14:12:48 UTC (rev 12651) +++ projects/haf/trunk/hildon-desktop/libhildonwm/hd-wm.h 2007-07-04 14:26:29 UTC (rev 12652) @@ -231,21 +231,15 @@ HDWMWindow* hd_wm_lookup_window_via_service (const gchar *service_name); -HDWMWindow* -hd_wm_lookup_window_via_menu_widget (GtkWidget *menu_widget); - HDWMApplication* hd_wm_lookup_application_via_service (const gchar *service_name); HDWMApplication* hd_wm_lookup_application_via_exec (const gchar *exec_name); -HDWMApplication* -hd_wm_lookup_application_via_menu (GtkWidget *menu); - gchar * hd_wm_compute_window_hibernation_key (Window xwin, - HDWMApplication *app); + HDWMApplication *app); void hd_wm_monitor_register (void); @@ -261,7 +255,7 @@ hd_wm_focus_active_window (HDWM *hdwm); void -hd_wm_set_all_menu_button (HDWM *hdwm, GtkWidget *widget); +hd_wm_set_all_menu_button (HDWM *hdwm, GObject *menu_button); gboolean hd_wm_fullscreen_mode (void); Modified: projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c =================================================================== --- projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c 2007-07-04 14:12:48 UTC (rev 12651) +++ projects/haf/trunk/hildon-desktop/src/hd-applications-menu.c 2007-07-04 14:26:29 UTC (rev 12652) @@ -174,7 +174,7 @@ gtk_widget_show_all (priv->button); hdwm = hd_wm_get_singleton (); - hd_wm_set_all_menu_button (hdwm, priv->button); + hd_wm_set_all_menu_button (hdwm, G_OBJECT (priv->button)); g_signal_connect (G_OBJECT (priv->button), "toggled", Modified: projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c =================================================================== --- projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c 2007-07-04 14:12:48 UTC (rev 12651) +++ projects/haf/trunk/hildon-desktop/src/hd-switcher-menu.c 2007-07-04 14:26:29 UTC (rev 12652) @@ -1390,7 +1390,7 @@ if (switcher->priv->is_open) { hildon_desktop_popup_menu_select_next_item (switcher->priv->menu_applications); - g_debug ("selecting next item"); + hd_wm_debug ("selecting next item"); } hildon_desktop_popup_window_popup Modified: projects/haf/trunk/hildon-desktop/src/hn-app-button.c =================================================================== --- projects/haf/trunk/hildon-desktop/src/hn-app-button.c 2007-07-04 14:12:48 UTC (rev 12651) +++ projects/haf/trunk/hildon-desktop/src/hn-app-button.c 2007-07-04 14:26:29 UTC (rev 12652) @@ -437,7 +437,7 @@ gtk_widget_set_size_request (menu, -1, -1); gtk_widget_size_request (menu, &req); gtk_widget_set_size_request (menu, - MAX (width, req.width), + AS_MENU_ITEM_WIDTH,/*MAX (width, req.width),*/ -1); return menu; Modified: projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c =================================================================== --- projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c 2007-07-04 14:12:48 UTC (rev 12651) +++ projects/haf/trunk/hildon-desktop/src/hn-app-switcher.c 2007-07-04 14:26:29 UTC (rev 12652) @@ -266,7 +266,7 @@ gboolean is_active = gtk_toggle_button_get_active (toggle); gboolean is_inconsistent = gtk_toggle_button_get_inconsistent (toggle); gchar *name,*name_pressed; - static gint i=0; + name = g_strdup_printf (AS_BUTTON_NAME,pos+1); @@ -286,11 +286,10 @@ g_free (name); g_free (name_pressed); - g_debug ("%i setting button (pos=%d) (inconsistent='<%s>', active='<%s>') name: %s", - i,pos, - is_inconsistent ? "true" : "false", - is_active ? "true" : "false", - gtk_widget_get_name (widget)); + hd_wm_debug ("setting button (pos=%d) (inconsistent='<%s>', active='<%s>') name: %s", + pos, is_inconsistent ? "true" : "false", + is_active ? "true" : "false", + gtk_widget_get_name (widget)); } static void @@ -353,7 +352,7 @@ name = g_strdup_printf (AS_BUTTON_NAME,pos+1); - g_debug ("Creating app button at pos %d (name %s)", pos, name); + hd_wm_debug ("Creating app button at pos %d (name %s)", pos, name); retval = hn_app_button_new (NULL); @@ -394,7 +393,7 @@ gtk_widget_push_composite_child (); /* most recent applications buttons */ - g_debug ("Adding buttons"); + hd_wm_debug ("Adding buttons"); for (i=0;i < app_switcher->priv->nitems;i++) { @@ -585,7 +584,7 @@ if (hd_wm_entry_info_is_urgent (_info) && !hd_wm_entry_info_get_ignore_urgent (_info)) { - g_debug("Found an urgent button"); + hd_wm_debug("Found an urgent button"); urgent = TRUE; } @@ -609,7 +608,7 @@ hn_app_button_set_group (app_button, priv->buttons_group); priv->buttons_group = hn_app_button_get_group (app_button); - g_debug ("buttons_group.size := %d", + hd_wm_debug ("buttons_group.size := %d", g_slist_length (priv->buttons_group)); hn_app_button_set_is_blinking (app_button, urgent); @@ -658,7 +657,7 @@ /* we just want the most recently used top-level applications */ if (!HD_WM_IS_APPLICATION (entry)) { - g_debug("Object is not an application"); + hd_wm_debug("Object is not an application"); continue; } @@ -688,7 +687,7 @@ { GtkToggleButton *button; - g_debug ("Unsetting the previously active button %d", + hd_wm_debug ("Unsetting the previously active button %d", active_button); button = GTK_TOGGLE_BUTTON (priv->buttons[active_button]); @@ -831,7 +830,7 @@ { HNAppSwitcher *app_switcher = HN_APP_SWITCHER (data); HNAppSwitcherPrivate *priv = app_switcher->priv; - g_debug ("In hn_app_switcher_real_changed_info"); + hd_wm_debug ("In hn_app_switcher_real_changed_info"); /* all changes have potential impact on the the main menu; app menus are * created on the fly, so we do not have to worry about menu changes there @@ -846,7 +845,7 @@ gint pos; GList * l; - g_debug ("HDEntryInfo present and of type APPLICATION"); + hd_wm_debug ("HDEntryInfo present and of type APPLICATION"); for (l = hd_wm_get_applications (hdwm), pos = 0; l != NULL && pos < priv->nitems; @@ -856,7 +855,7 @@ if (!HD_WM_IS_APPLICATION (entry)) { - g_debug("Object is not an application"); + hd_wm_debug("Object is not an application"); continue; } @@ -881,7 +880,7 @@ GList *l; gint pos; - g_debug ("HDEntryInfo present, with child entry"); + hd_wm_debug ("HDEntryInfo present, with child entry"); parent = hd_wm_entry_info_get_parent (entry_info); @@ -925,7 +924,7 @@ /* we just want the most recently used top-level applications */ if (!HD_WM_IS_APPLICATION (entry)) { - g_debug("Object is not an application"); + hd_wm_debug("Object is not an application"); continue; } @@ -938,7 +937,7 @@ if (button) { - g_debug ("Force the button's icon to update itself"); + hd_wm_debug ("Force the button's icon to update itself"); hn_app_button_force_update_icon (HN_APP_BUTTON (button)); } @@ -979,7 +978,7 @@ */ } - g_debug ("Queuing a refresh cycle of the buttons (info: %s)", + hd_wm_debug ("Queuing a refresh cycle of the buttons (info: %s)", entry_info != NULL ? "yes" : "no"); /* either global update (no entry_info) or a more complicated case that @@ -1002,7 +1001,7 @@ HDWMEntryInfo * parent; gboolean active_found = FALSE; - g_debug ("In hn_app_switcher_real_changed_stack"); + hd_wm_debug ("In hn_app_switcher_real_changed_stack"); if (!entry_info || !hd_wm_entry_info_is_active (entry_info)) @@ -1061,7 +1060,7 @@ { GtkToggleButton *app_button; - g_debug ("Setting inconsistent state for pos %d", pos); + hd_wm_debug ("Setting inconsistent state for pos %d", pos); app_button = GTK_TOGGLE_BUTTON (priv->buttons[pos]); gtk_toggle_button_set_inconsistent (app_button, TRUE); @@ -1087,7 +1086,7 @@ g_object_unref (app_switch->hdwm); - g_debug ("Destroying HNAppSwitcher"); + hd_wm_debug ("Destroying HNAppSwitcher"); G_OBJECT_CLASS (hn_app_switcher_parent_class)->finalize (gobject); } @@ -1100,13 +1099,13 @@ GObject *object; HNAppSwitcher *appswitcher; - g_debug ("inside hn_app_switcher_constructor..."); + hd_wm_debug ("inside hn_app_switcher_constructor..."); object = G_OBJECT_CLASS (hn_app_switcher_parent_class)->constructor (type,n_construct_params, construct_params); appswitcher = HN_APP_SWITCHER (object); - g_debug ("building HNAppSwitcher widget"); + hd_wm_debug ("building HNAppSwitcher widget"); hn_app_switcher_build (appswitcher); @@ -1301,7 +1300,7 @@ gtk_container_add (GTK_CONTAINER(hbox), label); gtk_container_add (GTK_CONTAINER(hbox), vbox); - g_debug ("there should be items %p", items); + hd_wm_debug ("there should be items %p", items); /* Collect open applications */ for (l = items; l; l = l->next) { @@ -1312,7 +1311,7 @@ GtkIconTheme *icon_theme; HDWMApplication *app; HDWMCADItem *item = (HDWMCADItem *) l->data; - g_debug ("item --> %p",l->data); + if (item->win == NULL) continue; Modified: projects/haf/trunk/hildon-desktop/src/hn-others-button.c =================================================================== --- projects/haf/trunk/hildon-desktop/src/hn-others-button.c 2007-07-04 14:12:48 UTC (rev 12651) +++ projects/haf/trunk/hildon-desktop/src/hn-others-button.c 2007-07-04 14:26:29 UTC (rev 12652) @@ -177,7 +177,7 @@ gtk_widget_show_all (priv->button); hdwm = hd_wm_get_singleton (); - hd_wm_set_all_menu_button (hdwm, priv->button); + hd_wm_set_all_menu_button (hdwm, G_OBJECT (priv->button)); g_signal_connect (G_OBJECT (priv->button), "button-press-event",
- Previous message: [maemo-commits] r12651 - in projects/haf/trunk/hildon-desktop: . libhildondesktop
- Next message: [maemo-commits] r12653 - in projects/haf/trunk/osso-gnome-vfs2/debian: . patches
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]