From: Jose Dapena Paz Date: Wed, 25 Nov 2009 12:56:51 +0000 (+0100) Subject: Remove src/widgets modest shell X-Git-Tag: jdapena-ppa-3.90.4-modest0~205 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=a6429d4d5c26c422406f633d7ed70f760200e11a Remove src/widgets modest shell --- diff --git a/src/gtk/modest-gtk-window-mgr.c b/src/gtk/modest-gtk-window-mgr.c index a925bd9..4e04955 100644 --- a/src/gtk/modest-gtk-window-mgr.c +++ b/src/gtk/modest-gtk-window-mgr.c @@ -200,6 +200,7 @@ modest_gtk_window_mgr_instance_init (ModestGtkWindowMgr *obj) priv->modal_handler_uids = NULL; priv->shell = modest_shell_new (); + gtk_widget_show (priv->shell); } static void @@ -416,7 +417,6 @@ modest_gtk_window_mgr_register_window (ModestWindowMgr *self, ModestWindow *current_top; g_return_val_if_fail (MODEST_IS_GTK_WINDOW_MGR (self), FALSE); - g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE); priv = MODEST_GTK_WINDOW_MGR_GET_PRIVATE (self); diff --git a/src/gtk/modest-platform.c b/src/gtk/modest-platform.c index dbeedfc..bb1fadb 100644 --- a/src/gtk/modest-platform.c +++ b/src/gtk/modest-platform.c @@ -103,6 +103,7 @@ on_modest_conf_update_interval_changed (ModestConf* self, static gboolean check_required_files (void) { +#if 0 FILE *mcc_file = modest_utils_open_mcc_mapping_file (); if (!mcc_file) { @@ -117,7 +118,7 @@ check_required_files (void) g_printerr ("modest: cannot find providers data\n"); return FALSE; } - +#endif return TRUE; } diff --git a/src/gtk/modest-shell.c b/src/gtk/modest-shell.c index 6578312..ac400ed 100644 --- a/src/gtk/modest-shell.c +++ b/src/gtk/modest-shell.c @@ -96,10 +96,9 @@ modest_shell_instance_init (ModestShell *obj) gtk_widget_show (priv->main_vbox); priv->notebook = gtk_notebook_new (); - gtk_notebook_set_show_tabs (GTK_NOTEBOOK (priv->notebook), FALSE); gtk_widget_show (priv->notebook); gtk_box_pack_start (GTK_BOX (priv->main_vbox), priv->notebook, TRUE, TRUE, 0); - + gtk_container_add (GTK_CONTAINER (obj), priv->main_vbox); } static void diff --git a/src/gtk/modest-shell.h b/src/gtk/modest-shell.h index 4260a57..427f967 100644 --- a/src/gtk/modest-shell.h +++ b/src/gtk/modest-shell.h @@ -52,7 +52,7 @@ struct _ModestShell { }; struct _ModestShellClass { - GtkWindow parent_class; + GtkWindowClass parent_class; }; diff --git a/src/hildon2/modest-hildon2-window.c b/src/hildon2/modest-hildon2-window.c index 66dd145..ac1aa83 100644 --- a/src/hildon2/modest-hildon2-window.c +++ b/src/hildon2/modest-hildon2-window.c @@ -218,7 +218,6 @@ modest_hildon2_window_instance_init (GTypeInstance *instance, gpointer g_class) priv->edit_mode_registry = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, edit_mode_register_destroy); - parent_priv->ui_dimming_manager = modest_ui_dimming_manager_new(); priv->app_menu_dimming_group = modest_dimming_rules_group_new (MODEST_DIMMING_RULES_MENU, FALSE); gtk_window_add_accel_group (GTK_WINDOW (self), priv->accel_group); diff --git a/src/widgets/modest-folder-window.h b/src/widgets/modest-folder-window.h index 800d697..4994d0f 100644 --- a/src/widgets/modest-folder-window.h +++ b/src/widgets/modest-folder-window.h @@ -63,7 +63,7 @@ struct _ModestFolderWindowClass { #ifdef MODEST_TOOLKIT_HILDON2 ModestHildon2WindowClass parent_class; #else - ModestWindow parent_class; + ModestWindowClass parent_class; #endif }; diff --git a/src/widgets/modest-scrollable.c b/src/widgets/modest-scrollable.c index fab9450..3c92c3c 100644 --- a/src/widgets/modest-scrollable.c +++ b/src/widgets/modest-scrollable.c @@ -217,13 +217,13 @@ modest_scrollable_base_init (gpointer g_iface) G_PARAM_CONSTRUCT)); g_object_interface_install_property (g_iface, - g_param_spec_enum ("movement_mode", - "Directions scroll is allowed", - "Movements allowed in the scrollable", - MODEST_TYPE_MOVEMENT_MODE, - MODEST_MOVEMENT_MODE_VERTICAL, - G_PARAM_READWRITE | - G_PARAM_CONSTRUCT)); + g_param_spec_flags ("movement_mode", + "Directions scroll is allowed", + "Movements allowed in the scrollable", + MODEST_TYPE_MOVEMENT_MODE, + MODEST_MOVEMENT_MODE_VERTICAL, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT)); g_object_interface_install_property (g_iface, g_param_spec_int ("horizontal-max-overshoot", diff --git a/src/widgets/modest-scrolled-window-scrollable.c b/src/widgets/modest-scrolled-window-scrollable.c index 3bd53cd..5b2924b 100644 --- a/src/widgets/modest-scrolled-window-scrollable.c +++ b/src/widgets/modest-scrolled-window-scrollable.c @@ -84,7 +84,6 @@ G_DEFINE_TYPE_EXTENDED (ModestScrolledWindowScrollable, 0, { G_IMPLEMENT_INTERFACE (MODEST_TYPE_SCROLLABLE, modest_scrollable_iface_init); - g_type_interface_add_prerequisite (g_define_type_id, GTK_TYPE_BIN); } ); @@ -140,13 +139,13 @@ modest_scrolled_window_scrollable_class_init (ModestScrolledWindowScrollableClas g_object_class_install_property (gobject_class, PROP_MOVEMENT_MODE, - g_param_spec_enum ("movement_mode", - "Directions scroll is allowed", - "Movements allowed in the scrollable", - MODEST_TYPE_MOVEMENT_MODE, - MODEST_MOVEMENT_MODE_VERTICAL, - G_PARAM_READWRITE | - G_PARAM_CONSTRUCT)); + g_param_spec_flags ("movement_mode", + "Directions scroll is allowed", + "Movements allowed in the scrollable", + MODEST_TYPE_MOVEMENT_MODE, + MODEST_MOVEMENT_MODE_VERTICAL, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_HORIZONTAL_MAX_OVERSHOOT, diff --git a/src/widgets/modest-shell.h b/src/widgets/modest-shell.h deleted file mode 100644 index 156585d..0000000 --- a/src/widgets/modest-shell.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (c) 2006, Nokia Corporation - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the Nokia Corporation nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __MODEST_SHELL_H__ -#define __MODEST_SHELL_H__ - -#ifdef HAVE_CONFIG_H -#include -#endif /*HAVE_CONFIG_H*/ - -#include -#include -#include - -G_BEGIN_DECLS - -typedef GtkWindow ModestShellParent; -typedef GtkWindowClass ModestShellParentClass; - -/* convenience macros */ -#define MODEST_TYPE_SHELL (modest_shell_get_type()) -#define MODEST_SHELL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_SHELL,ModestShell)) -#define MODEST_SHELL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_SHELL,GObject)) -#define MODEST_IS_SHELL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_SHELL)) -#define MODEST_IS_SHELL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_SHELL)) -#define MODEST_SHELL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_SHELL,ModestShellClass)) - -typedef struct _ModestShell ModestShell; -typedef struct _ModestShellClass ModestShellClass; - -struct _ModestShell { - ModestShellParent parent; -}; - -struct _ModestShellClass { - ModestShellParentClass parent_class; - - /* virtual methods */ - void (*add_window_func) (ModestShell *self, ModestShellWindow *window); -}; - -/** - * modest_shell_get_type: - * - * get the #GType for #ModestShell - * - * Returns: the type - */ -GType modest_shell_get_type (void) G_GNUC_CONST; - - -void modest_shell_add_window (ModestShell *self, ModestShellWindow *window); - - -G_END_DECLS - -#endif /* __MODEST_WINDOW_H__ */ diff --git a/src/widgets/modest-window-mgr.c b/src/widgets/modest-window-mgr.c index 5611d85..a7d8a24 100644 --- a/src/widgets/modest-window-mgr.c +++ b/src/widgets/modest-window-mgr.c @@ -445,11 +445,12 @@ modest_window_mgr_register_help_id (ModestWindowMgr *self, GtkWindow *win, const /* we don't need 'self', but for API consistency... */ g_return_if_fail (self && MODEST_IS_WINDOW_MGR(self)); - g_return_if_fail (win && GTK_IS_WINDOW(win)); g_return_if_fail (help_id); - - g_object_set_data_full (G_OBJECT(win), MODEST_WINDOW_HELP_ID_PARAM, - g_strdup(help_id), g_free); + + if (GTK_IS_WINDOW (win)) { + g_object_set_data_full (G_OBJECT(win), MODEST_WINDOW_HELP_ID_PARAM, + g_strdup(help_id), g_free); + } } @@ -566,7 +567,7 @@ modest_window_mgr_register_window_default (ModestWindowMgr *self, ModestWindowMgrPrivate *priv; g_return_val_if_fail (MODEST_IS_WINDOW_MGR (self), FALSE); - g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE); + g_return_val_if_fail (MODEST_IS_WINDOW (window), FALSE); priv = MODEST_WINDOW_MGR_GET_PRIVATE (self); diff --git a/src/widgets/modest-window.c b/src/widgets/modest-window.c index 13e60db..9e17941 100644 --- a/src/widgets/modest-window.c +++ b/src/widgets/modest-window.c @@ -130,7 +130,7 @@ modest_window_get_type (void) parent_type = HILDON_TYPE_WINDOW; #endif #else - parent_type = GTK_TYPE_WINDOW; + parent_type = GTK_TYPE_VBOX; #endif my_type = g_type_register_static (parent_type, "ModestWindow", @@ -174,7 +174,7 @@ modest_window_init (ModestWindow *obj) priv = MODEST_WINDOW_GET_PRIVATE(obj); priv->ui_manager = NULL; - priv->ui_dimming_manager = NULL; + priv->ui_dimming_manager = modest_ui_dimming_manager_new (); priv->toolbar = NULL; priv->menubar = NULL;