[maemo-commits] [maemo-commits] r12504 - in projects/haf/trunk/hildon-plugins-settings: . data debian src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Jun 27 15:34:15 EEST 2007
- Previous message: [maemo-commits] r12503 - in projects/haf/trunk/gtk+: . gtk
- Next message: [maemo-commits] r12505 - projects/haf/trunk/hildon-plugins-settings/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: moimart Date: 2007-06-27 15:34:01 +0300 (Wed, 27 Jun 2007) New Revision: 12504 Modified: projects/haf/trunk/hildon-plugins-settings/ChangeLog projects/haf/trunk/hildon-plugins-settings/configure.ac projects/haf/trunk/hildon-plugins-settings/data/hildon-plugins-settings.desktop.in projects/haf/trunk/hildon-plugins-settings/debian/changelog projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-cell-renderer-button.c projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-settings-dialog.c projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-settings.c Log: 2007-06-27 Moises Martinez <moises.martinez at nokia.com> * data/hildon-plugins-settings.desktop.in: - Changed name to new one. * src/hildon-plugin-cell-renderer-button.c: - Fixed style of button. * src/hildon-plugin-settings-dialog.c: (hildon_plugin_settings_dialog_change_drag_icon_cb), added (hildon_plugin_settings_dialog_row_inserted_cb), added (hildon_plugin_settings_dialog_constructor): - Fixed buttons images. * src/hildon-plugin-settings.c: (_tn_visibility_filter), - Fixed strange cases when tw is NULL (WTF??) (_cell_mandatory_data_func): used also for tasknavigator. * configure.ac: 0.0.2 * debian/changelog updated. * ChangeLog updated. Modified: projects/haf/trunk/hildon-plugins-settings/ChangeLog =================================================================== --- projects/haf/trunk/hildon-plugins-settings/ChangeLog 2007-06-27 11:24:45 UTC (rev 12503) +++ projects/haf/trunk/hildon-plugins-settings/ChangeLog 2007-06-27 12:34:01 UTC (rev 12504) @@ -1,3 +1,20 @@ +2007-06-27 Moises Martinez <moises.martinez at nokia.com> + + * data/hildon-plugins-settings.desktop.in: + - Changed name to new one. + * src/hildon-plugin-cell-renderer-button.c: + - Fixed style of button. + * src/hildon-plugin-settings-dialog.c: + (hildon_plugin_settings_dialog_change_drag_icon_cb), added + (hildon_plugin_settings_dialog_row_inserted_cb), added + (hildon_plugin_settings_dialog_constructor): + - Fixed buttons images. + * src/hildon-plugin-settings.c: (_tn_visibility_filter), + - Fixed strange cases when tw is NULL (WTF??) + (_cell_mandatory_data_func): used also for tasknavigator. + * configure.ac: 0.0.2 + * debian/changelog updated. + 2007-06-26 Moises Martinez <moises.martinez at nokia.com> * src/hildon-plugin-settings-dialog.[ch]: Modified: projects/haf/trunk/hildon-plugins-settings/configure.ac =================================================================== --- projects/haf/trunk/hildon-plugins-settings/configure.ac 2007-06-27 11:24:45 UTC (rev 12503) +++ projects/haf/trunk/hildon-plugins-settings/configure.ac 2007-06-27 12:34:01 UTC (rev 12504) @@ -1,5 +1,5 @@ AC_INIT(Makefile.am) -AM_INIT_AUTOMAKE(hildon-plugins-settings, 0.0.1) +AM_INIT_AUTOMAKE(hildon-plugins-settings, 0.0.2) AM_CONFIG_HEADER(config.h) AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],[Debug (default=no)])], Modified: projects/haf/trunk/hildon-plugins-settings/data/hildon-plugins-settings.desktop.in =================================================================== --- projects/haf/trunk/hildon-plugins-settings/data/hildon-plugins-settings.desktop.in 2007-06-27 11:24:45 UTC (rev 12503) +++ projects/haf/trunk/hildon-plugins-settings/data/hildon-plugins-settings.desktop.in 2007-06-27 12:34:01 UTC (rev 12504) @@ -1,5 +1,5 @@ [Desktop Entry] -Name=tncpa_ap_task_navigator +Name=tncpa_ap_tn_sb Comment=Panel Plugins Settins Type=HildonControlPanelPlugin Icon=qgn_list_cp_tana Modified: projects/haf/trunk/hildon-plugins-settings/debian/changelog =================================================================== --- projects/haf/trunk/hildon-plugins-settings/debian/changelog 2007-06-27 11:24:45 UTC (rev 12503) +++ projects/haf/trunk/hildon-plugins-settings/debian/changelog 2007-06-27 12:34:01 UTC (rev 12504) @@ -1,3 +1,20 @@ +hildon-plugins-settings (0.0.2-1) feisty; urgency=low + + * data/hildon-plugins-settings.desktop.in: + - Changed name to new one. + * src/hildon-plugin-cell-renderer-button.c: + - Fixed style of button. + * src/hildon-plugin-settings-dialog.c: + (hildon_plugin_settings_dialog_change_drag_icon_cb), added + (hildon_plugin_settings_dialog_row_inserted_cb), added + (hildon_plugin_settings_dialog_constructor): + - Fixed buttons images. + * src/hildon-plugin-settings.c: (_tn_visibility_filter), + - Fixed strange cases when tw is NULL (WTF??) + (_cell_mandatory_data_func): used also for tasknavigator. + + -- Moises Martinez <moises.martinez at nokia.com> Wed, 27 Jun 2007 15:31:13 +0300 + hildon-plugins-settings (0.0.1-2) unstable; urgency=low * Fixed debian/control dependencies. Modified: projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-cell-renderer-button.c =================================================================== --- projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-cell-renderer-button.c 2007-06-27 11:24:45 UTC (rev 12503) +++ projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-cell-renderer-button.c 2007-06-27 12:34:01 UTC (rev 12504) @@ -246,7 +246,7 @@ params); g_object_set (object, - "text", "Settings", + "text", "Organize", /*"size", 9*20,*/ /*"ellipsize", PANGO_ELLIPSIZE_END,*/ NULL); @@ -337,8 +337,8 @@ gint height) { gtk_paint_box (style, window, - GTK_STATE_SELECTED, - GTK_SHADOW_IN, + GTK_STATE_NORMAL, + GTK_SHADOW_OUT, expose_area, widget, "buttondefault", x, y, width, height); Modified: projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-settings-dialog.c =================================================================== --- projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-settings-dialog.c 2007-06-27 11:24:45 UTC (rev 12503) +++ projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-settings-dialog.c 2007-06-27 12:34:01 UTC (rev 12504) @@ -62,6 +62,10 @@ #define HD_DESKTOP_CONFIG_USER_PATH ".osso/hildon-desktop" #define HD_DESKTOP_CONFIG_PATH "/etc/hildon-desktop" +#define CPA_UP_BUTTON_ICON "qgn_indi_arrow_up" +#define CPA_DOWN_BUTTON_ICON "qgn_indi_arrow_down" +#define CPA_ARROW_BUTTON_ICON_SIZE 26 + #define HPSD_RESPONSE_UP GTK_RESPONSE_YES #define HPSD_RESPONSE_DOWN GTK_RESPONSE_NO @@ -213,8 +217,45 @@ if (tab->counter_limit > 0) tab->limit = tab->counter_limit; -} +} +static void +hildon_plugin_settings_dialog_change_drag_icon_cb (GtkWidget *widget, + GdkDragContext *context, + gpointer data) +{ + GtkTreeSelection *selection; + GtkTreeModel *model; + GtkTreeIter iter; + GdkPixbuf *pixbuf = NULL; + + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget)); + + if (!gtk_tree_selection_get_selected(selection, &model, &iter)) + return; + + gtk_tree_model_get (model,&iter, + HP_COL_PIXBUF, &pixbuf, + -1); + + if (!pixbuf) + return; + + gtk_drag_set_icon_pixbuf (context, pixbuf, 0, 0 ); + g_object_unref(pixbuf); + + g_signal_stop_emission_by_name(widget, "drag-begin"); +} + +static void +hildon_plugin_settings_dialog_row_inserted_cb (GtkTreeModel *tm, + GtkTreePath *path, + GtkTreeIter *iter, + GtkTreeView *tw) +{ + gtk_tree_view_set_cursor (tw, path, NULL, FALSE); +} + static GObject * hildon_plugin_settings_dialog_constructor (GType gtype, guint n_params, @@ -225,6 +266,9 @@ GtkWidget *button_up, *button_down, *scrolled_window; + GdkPixbuf *pb_up = NULL, + *pb_down = NULL; + GtkIconTheme *icon_theme = gtk_icon_theme_get_default (); GList *l; GError *error = NULL; @@ -259,12 +303,12 @@ HPSD_OK, GTK_RESPONSE_OK); - button_down = + button_up = gtk_dialog_add_button (dialog, "Up", HPSD_RESPONSE_DOWN); - button_up = + button_down = gtk_dialog_add_button (dialog, "Down", HPSD_RESPONSE_UP); @@ -272,6 +316,48 @@ settings->priv->button_up = button_up; settings->priv->button_down = button_down; + pb_down = gtk_icon_theme_load_icon + (icon_theme, + CPA_DOWN_BUTTON_ICON, CPA_ARROW_BUTTON_ICON_SIZE, + GTK_ICON_LOOKUP_NO_SVG, + &error); + + if (!error) + { + gtk_container_remove (GTK_CONTAINER (button_down), GTK_BIN (button_down)->child); + gtk_container_add (GTK_CONTAINER (button_down), + gtk_image_new_from_pixbuf (pb_down)); + gtk_widget_show (GTK_BIN (button_down)->child); + gdk_pixbuf_unref (pb_down); + + } + else + { + g_error_free (error); + error = NULL; + } + + pb_up = gtk_icon_theme_load_icon + (icon_theme, + CPA_UP_BUTTON_ICON, CPA_ARROW_BUTTON_ICON_SIZE, + GTK_ICON_LOOKUP_NO_SVG, + &error); + + if (!error) + { + gtk_container_remove (GTK_CONTAINER (button_up), GTK_BIN (button_up)->child); + gtk_container_add (GTK_CONTAINER (button_up), + gtk_image_new_from_pixbuf (pb_up)); + gtk_widget_show (GTK_BIN (button_up)->child); + gdk_pixbuf_unref (pb_up); + + } + else + { + g_error_free (error); + error = NULL; + } + settings->button_cancel = gtk_dialog_add_button (dialog, HPSD_CANCEL, @@ -314,6 +400,18 @@ else tw = gtk_tree_view_new_with_model (tab->parser->tm); + gtk_tree_view_set_reorderable (GTK_TREE_VIEW (tw), TRUE); + + g_signal_connect (tw, + "drag-begin", + G_CALLBACK (hildon_plugin_settings_dialog_change_drag_icon_cb), + NULL); + + g_signal_connect (tab->parser->tm, + "row-inserted", + G_CALLBACK (hildon_plugin_settings_dialog_row_inserted_cb), + tw); + tab->tw = GTK_TREE_VIEW (tw); g_object_set_data (G_OBJECT (tw), "tab-data", tab); Modified: projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-settings.c =================================================================== --- projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-settings.c 2007-06-27 11:24:45 UTC (rev 12503) +++ projects/haf/trunk/hildon-plugins-settings/src/hildon-plugin-settings.c 2007-06-27 12:34:01 UTC (rev 12504) @@ -42,10 +42,13 @@ static gboolean _tn_visibility_filter (GtkTreeModel *model, - GtkTreeIter *iter, - gpointer data) + GtkTreeIter *iter, + gpointer data) { - gchar *name; + if (!model || !iter) + return TRUE; + + gchar *name = NULL; gtk_tree_model_get (model, iter, @@ -53,6 +56,9 @@ &name, -1); + if (!name) + return TRUE; + if (g_str_equal (name,HP_APPLICATION_SWITCHER) || g_str_equal (name,HP_SWITCHER_MENU)) return FALSE; @@ -61,11 +67,11 @@ } static void -_sb_cell_mandatory_data_func (GtkTreeViewColumn *tc, - GtkCellRenderer *cell, - GtkTreeModel *tm, - GtkTreeIter *iter, - gpointer data) +_cell_mandatory_data_func (GtkTreeViewColumn *tc, + GtkCellRenderer *cell, + GtkTreeModel *tm, + GtkTreeIter *iter, + gpointer data) { gboolean mandatory; @@ -109,7 +115,7 @@ (HILDON_PLUGIN_SETTINGS_DIALOG (dialog), HPSD_COLUMN_TOGGLE, "Statusbar", - _sb_cell_mandatory_data_func, + _cell_mandatory_data_func, NULL, NULL); @@ -121,6 +127,14 @@ NULL, NULL); + hildon_plugin_settings_dialog_set_cell_data_func + (HILDON_PLUGIN_SETTINGS_DIALOG (dialog), + HPSD_COLUMN_TOGGLE, + "Tasknavigator", + _cell_mandatory_data_func, + NULL, + NULL); + hildon_plugin_settings_dialog_set_choosing_limit (HILDON_PLUGIN_SETTINGS_DIALOG (dialog), "Tasknavigator",
- Previous message: [maemo-commits] r12503 - in projects/haf/trunk/gtk+: . gtk
- Next message: [maemo-commits] r12505 - projects/haf/trunk/hildon-plugins-settings/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]