[maemo-commits] [maemo-commits] r9236 - projects/haf/trunk/hildon-fm/hildon-fm
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Jan 22 20:22:52 EET 2007
- Previous message: [maemo-commits] r9235 - projects/haf/trunk/hildon-fm/hildon-fm
- Next message: [maemo-commits] r9237 - projects/haf/trunk/hildon-fm/hildon-fm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: marivoll Date: 2007-01-22 20:22:51 +0200 (Mon, 22 Jan 2007) New Revision: 9236 Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-chooser-dialog.c projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-selection.c Log: * hildon-fm/hildon-file-chooser-dialog.c, hildon-fm/hildon-file-selection.c: Removed WITH_GTK_2_10 conditionals, keep the 2.10 stuff and the 2.6 stuff that now also works with maemo-gtk 2.10. Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-chooser-dialog.c =================================================================== --- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-chooser-dialog.c 2007-01-22 18:22:15 UTC (rev 9235) +++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-chooser-dialog.c 2007-01-22 18:22:51 UTC (rev 9236) @@ -32,12 +32,10 @@ #define _GNU_SOURCE /* To get the GNU version of basename. */ #include <string.h> -#if WITH_GTK_2_10 #define GTK_FILE_CHOOSER_ENABLE_UNSUPPORTED #define GTK_FILE_SYSTEM_ENABLE_UNSUPPORTED #include <gtk/gtkfilechooserutils.h> #include <gtk/gtkfilesystem.h> -#endif #include "hildon-file-selection.h" #include "hildon-file-chooser-dialog.h" @@ -72,71 +70,6 @@ #define FILE_SELECTION_WIDTH_TOTAL 590 /* Width for full filetree (both content and navigation pane) */ -#if !WITH_GTK_2_10 - -/* Copy paste from gtkfilechooserprivate.h to make implementation of - file chooser interface possible */ -typedef struct _GtkFileChooserIface GtkFileChooserIface; - -struct _GtkFileChooserIface { - GTypeInterface base_iface; - - /* Methods */ - gboolean(*set_current_folder) (GtkFileChooser * chooser, - const GtkFilePath * path, - GError ** error); - GtkFilePath *(*get_current_folder) (GtkFileChooser * chooser); - void (*set_current_name) (GtkFileChooser * chooser, - const gchar * name); - gboolean(*select_path) (GtkFileChooser * chooser, - const GtkFilePath * path, GError ** error); - void (*unselect_path) (GtkFileChooser * chooser, - const GtkFilePath * path); - void (*select_all) (GtkFileChooser * chooser); - void (*unselect_all) (GtkFileChooser * chooser); - GSList *(*get_paths) (GtkFileChooser * chooser); - GtkFilePath *(*get_preview_path) (GtkFileChooser * chooser); - GtkFileSystem *(*get_file_system) (GtkFileChooser * chooser); - void (*add_filter) (GtkFileChooser * chooser, GtkFileFilter * filter); - void (*remove_filter) (GtkFileChooser * chooser, - GtkFileFilter * filter); - GSList *(*list_filters) (GtkFileChooser * chooser); - gboolean(*add_shortcut_folder) (GtkFileChooser * chooser, - const GtkFilePath * path, - GError ** error); - gboolean(*remove_shortcut_folder) (GtkFileChooser * chooser, - const GtkFilePath * path, - GError ** error); - GSList *(*list_shortcut_folders) (GtkFileChooser * chooser); - - /* Signals */ - void (*current_folder_changed) (GtkFileChooser * chooser); - void (*selection_changed) (GtkFileChooser * chooser); - void (*update_preview) (GtkFileChooser * chooser); - void (*file_activated) (GtkFileChooser * chooser); -}; - -/* From gtkfilechooserutils.h */ - -typedef enum { - GTK_FILE_CHOOSER_PROP_FIRST = 0x1000, - GTK_FILE_CHOOSER_PROP_ACTION = GTK_FILE_CHOOSER_PROP_FIRST, - GTK_FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND, - GTK_FILE_CHOOSER_PROP_FILTER, - GTK_FILE_CHOOSER_PROP_LOCAL_ONLY, - GTK_FILE_CHOOSER_PROP_PREVIEW_WIDGET, - GTK_FILE_CHOOSER_PROP_PREVIEW_WIDGET_ACTIVE, - GTK_FILE_CHOOSER_PROP_USE_PREVIEW_LABEL, - GTK_FILE_CHOOSER_PROP_EXTRA_WIDGET, - GTK_FILE_CHOOSER_PROP_SELECT_MULTIPLE, - GTK_FILE_CHOOSER_PROP_SHOW_HIDDEN, - GTK_FILE_CHOOSER_PROP_LAST = GTK_FILE_CHOOSER_PROP_SHOW_HIDDEN -} GtkFileChooserProp; - -/* CopyPaste ends */ - -#endif /* !WITH_GTK_2_10 */ - void hildon_gtk_file_chooser_install_properties(GObjectClass * klass); enum { @@ -226,9 +159,6 @@ return (first_digit << 4) | second_digit; } -#if !WITH_GTK_2_10 -/* XXX - Is the "invalid-input" signal supported in Gtk+ 2.10? - */ static void chooser_entry_invalid_input_cb (GtkEntry *entry, GtkInvalidInputType inv_type, gpointer user_data) @@ -239,7 +169,6 @@ HCS("ckdg_ib_maximum_characters_reached")); } } -#endif static gchar * g_unescape_uri_string (const char *escaped, @@ -525,7 +454,7 @@ is_folder = FALSE; -#if !WITH_GTK_2_10 +#if 0 /* XXX - Do it asyncronously for Gtk+ 2.10. */ @@ -1859,12 +1788,9 @@ g_signal_connect( priv->entry_name, "changed", G_CALLBACK( hildon_file_chooser_entry_changed ), self ); -#if !WITH_GTK_2_10 - /* XXX - Is the "invalid-input" signal supported in Gtk+ 2.10? - */ + g_signal_connect(priv->entry_name, "invalid-input", G_CALLBACK(chooser_entry_invalid_input_cb), self); -#endif priv->hbox_location = gtk_hbox_new(FALSE, HILDON_MARGIN_DEFAULT); priv->hbox_items = gtk_hbox_new(FALSE, HILDON_MARGIN_DEFAULT); Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-selection.c =================================================================== --- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-selection.c 2007-01-22 18:22:15 UTC (rev 9235) +++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-selection.c 2007-01-22 18:22:51 UTC (rev 9236) @@ -1954,17 +1954,10 @@ * So this is only for active cells */ if (sensitive) { -#if WITH_GTK_2_10 - /* XXX - gtk_style_lookup_logical_color is not in Gtk+ 2.10. Is - it Hildon specific? Will it appear in Maemo-Gtk 2.10? - */ - found1 = found2 = FALSE; -#else found1 = gtk_style_lookup_logical_color(GTK_WIDGET(data)->style, "DefaultTextColor", &color1); found2 = gtk_style_lookup_logical_color(GTK_WIDGET(data)->style, "SecondaryTextColor", &color2); -#endif attrs = pango_attr_list_new(); bytes1 = strlen(title); @@ -2067,10 +2060,6 @@ g_object_set(cell, "text", buffer, "sensitive", sensitive, NULL); } -#if !WITH_GTK_2_10 -/* XXX - the tap-and-hold machinery will eventually appear in - Maemo-Gtk 2.10. -*/ static void hildon_file_selection_navigation_pane_context(GtkWidget * widget, gpointer data) @@ -2087,7 +2076,6 @@ ULOG_DEBUG(__FUNCTION__); g_signal_emit(data, signal_content_pane_context_menu, 0); } -#endif static gboolean hildon_file_selection_on_content_pane_key(GtkWidget * widget, @@ -2236,11 +2224,6 @@ } } -#if !WITH_GTK_2_10 -/* XXX - the tap-and-hold machinery will eventually appear in - Maemo-Gtk 2.10. -*/ - static gboolean tap_and_hold_query (gpointer self, guint signal_id) { @@ -2265,7 +2248,6 @@ { return tap_and_hold_query (self, signal_navigation_pane_context_menu); } -#endif static void hildon_file_selection_create_thumbnail_view(HildonFileSelection * self) @@ -2322,10 +2304,7 @@ g_signal_connect_object(tree, "key-press-event", G_CALLBACK(hildon_file_selection_on_content_pane_key), self, 0); -#if !WITH_GTK_2_10 - /* XXX - the tap-and-hold machinery will eventually appear in - Maemo-Gtk 2.10. - */ + gtk_widget_tap_and_hold_setup(GTK_WIDGET(tree), NULL, NULL, GTK_TAP_AND_HOLD_NONE | GTK_TAP_AND_HOLD_NO_INTERNALS); g_signal_connect_object (tree, "tap-and-hold-query", @@ -2334,7 +2313,7 @@ g_signal_connect_object(tree, "tap-and-hold", G_CALLBACK (hildon_file_selection_content_pane_context), self, 0); -#endif + g_signal_connect_object(tree, "notify::has-focus", G_CALLBACK(content_pane_focus), self, 0); } @@ -2445,11 +2424,6 @@ G_CALLBACK (hildon_file_selection_content_pane_selection_changed), self, 0); -#if !WITH_GTK_2_10 - /* XXX - the tap-and-hold machinery will eventually appear in - Maemo-Gtk 2.10. - */ - gtk_widget_tap_and_hold_setup(GTK_WIDGET(tree), NULL, NULL, GTK_TAP_AND_HOLD_NONE | GTK_TAP_AND_HOLD_NO_INTERNALS); g_signal_connect_object (tree, "tap-and-hold-query", @@ -2458,7 +2432,6 @@ g_signal_connect_object(tree, "tap-and-hold", G_CALLBACK (hildon_file_selection_content_pane_context), self, 0); -#endif g_signal_connect_object(tree, "key-press-event", G_CALLBACK(hildon_file_selection_on_content_pane_key), @@ -2546,11 +2519,6 @@ G_CALLBACK(hildon_file_selection_selection_changed), self, 0); -#if !WITH_GTK_2_10 - /* XXX - the tap-and-hold machinery will eventually appear in - Maemo-Gtk 2.10. - */ - gtk_widget_tap_and_hold_setup(GTK_WIDGET(self->priv->dir_tree), NULL, NULL, GTK_TAP_AND_HOLD_NONE | GTK_TAP_AND_HOLD_NO_INTERNALS); g_signal_connect_object (self->priv->dir_tree, "tap-and-hold-query", @@ -2560,7 +2528,6 @@ G_CALLBACK (hildon_file_selection_navigation_pane_context), self, 0); -#endif g_signal_connect_object(self->priv->dir_tree, "key-press-event", G_CALLBACK
- Previous message: [maemo-commits] r9235 - projects/haf/trunk/hildon-fm/hildon-fm
- Next message: [maemo-commits] r9237 - projects/haf/trunk/hildon-fm/hildon-fm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]