aboutsummaryrefslogtreecommitdiff
path: root/hildon
diff options
context:
space:
mode:
authorTomasz Sterna <tomek@xiaoka.com>2012-01-04 23:58:10 +0100
committerTomasz Sterna <tomek@xiaoka.com>2012-01-24 00:36:01 +0100
commit66b5569ee4af3c6044c8e94b749fe8f22659a24a (patch)
treec3bed53057fe0fa204097f9bca13c8902fa1155e /hildon
parentdf3f3c11dfadc3d0d191f8a642b407d29fca2084 (diff)
Removed MAEMO_CHANGES and MAEMO_GTK
Diffstat (limited to 'hildon')
-rw-r--r--hildon/Makefile.am1
-rw-r--r--hildon/hildon-banner.c23
-rw-r--r--hildon/hildon-find-toolbar.c35
-rw-r--r--hildon/hildon-gtk.c126
-rw-r--r--hildon/hildon-gtk.h29
-rw-r--r--hildon/hildon-live-search.c19
-rw-r--r--hildon/hildon-note.c56
-rw-r--r--hildon/hildon-picker-dialog.c9
-rw-r--r--hildon/hildon-text-view.c12
-rw-r--r--hildon/hildon-touch-selector-entry.c70
-rw-r--r--hildon/hildon-touch-selector-entry.h9
-rw-r--r--hildon/hildon-touch-selector.c147
-rw-r--r--hildon/hildon-touch-selector.h9
13 files changed, 5 insertions, 540 deletions
diff --git a/hildon/Makefile.am b/hildon/Makefile.am
index 3f578da..1f8b8d6 100644
--- a/hildon/Makefile.am
+++ b/hildon/Makefile.am
@@ -22,7 +22,6 @@ libhildon_@API_VERSION_MAJOR@_la_LIBADD = \
libhildon_@API_VERSION_MAJOR@_la_CFLAGS = \
$(GTK_CFLAGS) \
$(GCONF_CFLAGS) \
- $(EXTRA_CFLAGS) \
$(CANBERRA_CFLAGS)
libhildon_@API_VERSION_MAJOR@_la_SOURCES = \
diff --git a/hildon/hildon-banner.c b/hildon/hildon-banner.c
index 7e0c48e..8339866 100644
--- a/hildon/hildon-banner.c
+++ b/hildon/hildon-banner.c
@@ -559,26 +559,6 @@ hildon_banner_button_press_event (GtkWidget* widget,
return result;
}
-#if defined(MAEMO_GTK)
-static void
-hildon_banner_map (GtkWidget *widget)
-{
- if (GTK_WIDGET_CLASS (hildon_banner_parent_class)->map) {
- /* Make the banner temporary _before_ mapping it, to avoid closing
- * other temporary windows */
- gtk_window_set_is_temporary (GTK_WINDOW (widget), TRUE);
-
- GTK_WIDGET_CLASS (hildon_banner_parent_class)->map (widget);
-
- /* Make the banner non-temporary _after_ mapping it, to avoid
- * being closed by other non-temporary windows */
- gtk_window_set_is_temporary (GTK_WINDOW (widget), FALSE);
-
- gtk_window_move (GTK_WINDOW (widget), 0, HILDON_WINDOW_TITLEBAR_HEIGHT);
- }
-}
-#endif
-
/* We start the timer for timed notifications after the window appears on screen */
static gboolean
hildon_banner_map_event (GtkWidget *widget,
@@ -747,9 +727,6 @@ hildon_banner_class_init (HildonBannerClass *klass)
widget_class->realize = hildon_banner_realize;
widget_class->unrealize = hildon_banner_unrealize;
widget_class->button_press_event = hildon_banner_button_press_event;
-#if defined(MAEMO_GTK)
- widget_class->map = hildon_banner_map;
-#endif
/* Install properties.
We need construct properties for singleton purposes */
diff --git a/hildon/hildon-find-toolbar.c b/hildon/hildon-find-toolbar.c
index ce9d457..23e5a87 100644
--- a/hildon/hildon-find-toolbar.c
+++ b/hildon/hildon-find-toolbar.c
@@ -99,13 +99,6 @@ static void
hildon_find_toolbar_emit_close (GtkButton *button,
gpointer self);
-#ifdef MAEMO_GTK
-static void
-hildon_find_toolbar_emit_invalid_input (GtkEntry *entry,
- GtkInvalidInputType type,
- gpointer self);
-#endif
-
static void
hildon_find_toolbar_entry_activate (GtkWidget *widget,
gpointer user_data);
@@ -463,32 +456,10 @@ static void
hildon_find_toolbar_emit_close (GtkButton *button,
gpointer self)
{
-#ifdef MAEMO_GTK
- HildonFindToolbarPrivate *priv = HILDON_FIND_TOOLBAR_GET_PRIVATE (self);
- g_assert (priv);
-
- GtkWidget *entry = gtk_bin_get_child (GTK_BIN (priv->entry_combo_box));
- if (GTK_WIDGET_HAS_FOCUS (entry))
- {
- hildon_gtk_im_context_hide (GTK_ENTRY (entry)->im_context);
- }
-#endif
-
/* Clicked close button */
g_signal_emit (self, HildonFindToolbar_signal [CLOSE], 0);
}
-#ifdef MAEMO_GTK
-static void
-hildon_find_toolbar_emit_invalid_input (GtkEntry *entry,
- GtkInvalidInputType type,
- gpointer self)
-{
- if(type == GTK_INVALID_INPUT_MAX_CHARS_REACHED)
- g_signal_emit (self, HildonFindToolbar_signal [INVALID_INPUT], 0);
-}
-#endif
-
static void
hildon_find_toolbar_entry_activate (GtkWidget *widget,
gpointer user_data)
@@ -684,12 +655,6 @@ hildon_find_toolbar_init (HildonFindToolbar *self)
/* ComboBoxEntry for search prefix string / history list */
priv->entry_combo_box = GTK_COMBO_BOX_ENTRY (gtk_combo_box_entry_new ());
-#ifdef MAEMO_GTK
- g_signal_connect (hildon_find_toolbar_get_entry(priv),
- "invalid_input",
- G_CALLBACK(hildon_find_toolbar_emit_invalid_input), self);
-#endif
-
entry_combo_box_container = gtk_tool_item_new ();
alignment = GTK_ALIGNMENT (gtk_alignment_new (0, 0.5, 1, 0));
diff --git a/hildon/hildon-gtk.c b/hildon/hildon-gtk.c
index 8d0e0c2..747a27c 100644
--- a/hildon/hildon-gtk.c
+++ b/hildon/hildon-gtk.c
@@ -212,115 +212,6 @@ hildon_gtk_radio_button_new_from_widget (HildonSizeType size,
return button;
}
-#ifdef MAEMO_GTK
-/**
- * hildon_gtk_tree_view_new:
- * @mode: the Hildon UI mode
- *
- * Creates a new #GtkTreeView widget with the Hildon UI mode set to
- * @mode
- *
- * Return value: A newly created #GtkTreeView widget.
- *
- * Since: 2.2
- **/
-GtkWidget *
-hildon_gtk_tree_view_new (HildonUIMode mode)
-{
- return g_object_new (GTK_TYPE_TREE_VIEW, "hildon-ui-mode", mode,
- "enable-search", FALSE, NULL);
-}
-
-/**
- * hildon_gtk_tree_view_new_with_model:
- * @mode: the Hildon UI mode
- * @model: the model.
- *
- * Creates a new #GtkTreeView widget with the Hildon UI mode set to
- * @mode and the model initialized to @model.
- *
- * Return value: A newly created #GtkTreeView widget.
- *
- * Since: 2.2
- **/
-GtkWidget *
-hildon_gtk_tree_view_new_with_model (HildonUIMode mode,
- GtkTreeModel *model)
-{
- return g_object_new (GTK_TYPE_TREE_VIEW, "hildon-ui-mode", mode, "model", model, NULL);
-}
-
-/**
- * hildon_gtk_tree_view_set_ui_mode:
- * @treeview: A #GtkTreeView
- * @mode: The new #HildonUIMode
- *
- * Sets the UI mode of @treeview to @mode.
- *
- * Since: 2.2
- **/
-void
-hildon_gtk_tree_view_set_ui_mode (GtkTreeView *treeview,
- HildonUIMode mode)
-{
- g_return_if_fail (GTK_IS_TREE_VIEW (treeview));
- g_object_set (treeview, "hildon-ui-mode", mode, NULL);
-}
-
-/**
- * hildon_gtk_icon_view_new:
- * @mode: the Hildon UI mode
- *
- * Creates a new #GtkIconView widget with the Hildon UI mode set to
- * @mode
- *
- * Return value: A newly created #GtkIconView widget
- *
- * Since: 2.2
- **/
-GtkWidget *
-hildon_gtk_icon_view_new (HildonUIMode mode)
-{
- return g_object_new (GTK_TYPE_ICON_VIEW, "hildon-ui-mode", mode, NULL);
-}
-
-/**
- * hildon_gtk_icon_view_new_with_model:
- * @mode: the Hildon UI mode
- * @model: The model.
- *
- * Creates a new #GtkIconView widget with the Hildon UI mode set to
- * @mode and the model intitialized to @model.
- *
- * Return value: A newly created #GtkIconView widget.
- *
- * Since: 2.2
- **/
-GtkWidget *
-hildon_gtk_icon_view_new_with_model (HildonUIMode mode,
- GtkTreeModel *model)
-{
- return g_object_new (GTK_TYPE_ICON_VIEW, "hildon-ui-mode", mode, "model", model, NULL);
-}
-
-/**
- * hildon_gtk_icon_view_set_ui_mode:
- * @iconview: A #GtkIconView
- * @mode: The new #HildonUIMode
- *
- * Sets the UI mode of @iconview to @mode.
- *
- * Since: 2.2
- **/
-void
-hildon_gtk_icon_view_set_ui_mode (GtkIconView *iconview,
- HildonUIMode mode)
-{
- g_return_if_fail (GTK_IS_ICON_VIEW (iconview));
- g_object_set (iconview, "hildon-ui-mode", mode, NULL);
-}
-#endif /* MAEMO_GTK */
-
static void
do_set_progress_indicator (GtkWindow *window,
gpointer stateptr)
@@ -558,12 +449,7 @@ GtkWidget*
hildon_gtk_hscale_new (void)
{
GtkWidget *scale = gtk_hscale_new_with_range (0.0, 1.0, 0.1);
- g_object_set (scale,
- "draw-value", FALSE,
-#ifdef MAEMO_GTK
- "jump-to-position", TRUE,
-#endif
- NULL);
+ g_object_set (scale, "draw-value", FALSE, NULL);
return scale;
}
@@ -587,18 +473,11 @@ GtkWidget*
hildon_gtk_vscale_new (void)
{
GtkWidget *scale = gtk_vscale_new_with_range (0.0, 1.0, 0.1);
- g_object_set (scale,
- "draw-value", FALSE,
-#ifdef MAEMO_GTK
- "jump-to-position", TRUE,
-#endif
- NULL);
+ g_object_set (scale, "draw-value", FALSE, NULL);
return scale;
}
-#ifndef MAEMO_GTK
-
#define HILDON_HEIGHT_FINGER 70
#define HILDON_HEIGHT_THUMB 105
@@ -657,4 +536,3 @@ hildon_gtk_widget_set_theme_size (GtkWidget *widget,
g_free (widget_name);
}
}
-#endif
diff --git a/hildon/hildon-gtk.h b/hildon/hildon-gtk.h
index 7ce004f..e1e8e53 100644
--- a/hildon/hildon-gtk.h
+++ b/hildon/hildon-gtk.h
@@ -21,7 +21,6 @@
G_BEGIN_DECLS
-#ifndef MAEMO_GTK
typedef enum {
HILDON_SIZE_AUTO_WIDTH = 0 << 0, /* set to automatic width */
HILDON_SIZE_HALFSCREEN_WIDTH = 1 << 0, /* set to 50% screen width */
@@ -31,7 +30,6 @@ typedef enum {
HILDON_SIZE_THUMB_HEIGHT = 2 << 2, /* set to thumb height */
HILDON_SIZE_AUTO = (HILDON_SIZE_AUTO_WIDTH | HILDON_SIZE_AUTO_HEIGHT)
} HildonSizeType;
-#endif /* MAEMO_GTK */
GtkWidget *
@@ -51,30 +49,6 @@ GtkWidget *
hildon_gtk_radio_button_new_from_widget (HildonSizeType size,
GtkRadioButton *radio_group_member);
-#ifdef MAEMO_GTK
-GtkWidget *
-hildon_gtk_tree_view_new (HildonUIMode mode);
-
-GtkWidget *
-hildon_gtk_tree_view_new_with_model (HildonUIMode mode,
- GtkTreeModel *model);
-
-void
-hildon_gtk_tree_view_set_ui_mode (GtkTreeView *treeview,
- HildonUIMode mode);
-
-GtkWidget *
-hildon_gtk_icon_view_new (HildonUIMode mode);
-
-GtkWidget *
-hildon_gtk_icon_view_new_with_model (HildonUIMode mode,
- GtkTreeModel *model);
-
-void
-hildon_gtk_icon_view_set_ui_mode (GtkIconView *iconview,
- HildonUIMode mode);
-#endif /* MAEMO_GTK */
-
void
hildon_gtk_window_set_progress_indicator (GtkWindow *window,
guint state);
@@ -129,11 +103,8 @@ hildon_gtk_hscale_new (void);
GtkWidget*
hildon_gtk_vscale_new (void);
-#ifndef MAEMO_GTK
void hildon_gtk_widget_set_theme_size (GtkWidget *widget,
HildonSizeType size);
-#endif /* MAEMO_GTK */
-
G_END_DECLS
diff --git a/hildon/hildon-live-search.c b/hildon/hildon-live-search.c
index 70b2f21..c626b62 100644
--- a/hildon/hildon-live-search.c
+++ b/hildon/hildon-live-search.c
@@ -768,15 +768,6 @@ close_button_clicked_cb (GtkWidget *button,
gtk_widget_hide (GTK_WIDGET (user_data));
}
-#ifdef MAEMO_GTK
-static HildonGtkInputMode
-filter_input_mode (HildonGtkInputMode imode)
-{
- return imode & ~(HILDON_GTK_INPUT_MODE_AUTOCAP |
- HILDON_GTK_INPUT_MODE_DICTIONARY);
-}
-#endif
-
static void
hildon_live_search_init (HildonLiveSearch *self)
{
@@ -787,9 +778,6 @@ hildon_live_search_init (HildonLiveSearch *self)
GtkToolItem *close_button;
GtkToolItem *entry_container;
GtkWidget *entry_hbox;
-#ifdef MAEMO_GTK
- HildonGtkInputMode imode;
-#endif
self->priv = priv = GET_PRIVATE (self);
gtk_toolbar_set_style (GTK_TOOLBAR (self), GTK_TOOLBAR_ICONS);
@@ -817,13 +805,6 @@ hildon_live_search_init (HildonLiveSearch *self)
priv->entry = hildon_entry_new (HILDON_SIZE_FINGER_HEIGHT);
-#ifdef MAEMO_GTK
- /* Unset the autocap and dictionary input flags from the
- HildonEntry. */
- imode = hildon_gtk_entry_get_input_mode (GTK_ENTRY (priv->entry));
- hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry),
- filter_input_mode (imode));
-#endif
gtk_widget_set_name (GTK_WIDGET (priv->entry),
"HildonLiveSearchEntry");
diff --git a/hildon/hildon-note.c b/hildon/hildon-note.c
index 00781e0..ac74028 100644
--- a/hildon/hildon-note.c
+++ b/hildon/hildon-note.c
@@ -118,11 +118,6 @@ hildon_note_init (HildonNote *dialog);
static void
hildon_note_rebuild (HildonNote *note);
-#ifdef MAEMO_GTK
-static void
-hildon_note_set_padding (HildonNote *note);
-#endif /* MAEMO_GTK */
-
static void
hildon_note_rename (HildonNote *note);
@@ -647,39 +642,6 @@ hildon_note_rename (HildonNote *note)
g_type_class_unref (enum_class);
}
-#ifdef MAEMO_GTK
-static void
-hildon_note_set_padding (HildonNote *note)
-{
- HildonNotePrivate *priv;
-
- priv = HILDON_NOTE_GET_PRIVATE (note);
-
- switch (priv->note_n) {
- case HILDON_NOTE_TYPE_INFORMATION:
- case HILDON_NOTE_TYPE_INFORMATION_THEME:
- gtk_dialog_set_padding (GTK_DIALOG (note),
- HILDON_MARGIN_DOUBLE,
- HILDON_MARGIN_DOUBLE,
- 0,
- 0);
- break;
-
- case HILDON_NOTE_TYPE_CONFIRMATION:
- case HILDON_NOTE_TYPE_CONFIRMATION_BUTTON:
- gtk_dialog_set_padding (GTK_DIALOG (note),
- HILDON_MARGIN_DOUBLE,
- HILDON_MARGIN_DEFAULT,
- HILDON_MARGIN_DOUBLE,
- HILDON_MARGIN_DOUBLE);
- break;
-
- default:
- break;
- }
-}
-#endif /* MAEMO_GTK */
-
static void
hildon_note_rebuild (HildonNote *note)
{
@@ -725,13 +687,6 @@ hildon_note_rebuild (HildonNote *note)
g_object_get (priv->okButton, "width-request",
&priv->button_width, NULL);
gtk_widget_set_no_show_all (priv->cancelButton, FALSE);
-#ifdef MAEMO_GTK
- gtk_dialog_set_padding (dialog,
- HILDON_MARGIN_DOUBLE,
- HILDON_MARGIN_DEFAULT,
- HILDON_MARGIN_DOUBLE,
- HILDON_MARGIN_DOUBLE);
-#endif /* MAEMO_GTK */
break;
case HILDON_NOTE_TYPE_PROGRESSBAR:
@@ -742,13 +697,6 @@ hildon_note_rebuild (HildonNote *note)
break;
case HILDON_NOTE_TYPE_INFORMATION:
-#ifdef MAEMO_GTK
- gtk_dialog_set_padding (dialog,
- HILDON_MARGIN_DOUBLE,
- HILDON_MARGIN_DOUBLE,
- 0,
- 0);
-#endif /* MAEMO_GTK */
is_info_note = TRUE;
break;
@@ -783,10 +731,6 @@ hildon_note_rebuild (HildonNote *note)
gtk_alignment_set_padding (GTK_ALIGNMENT (priv->align), 0, 0, 0, 0);
}
-#ifdef MAEMO_GTK
- hildon_note_set_padding (note);
-#endif /* MAEMO_GTK */
-
gtk_container_add (GTK_CONTAINER (dialog->vbox), priv->event_box);
gtk_widget_show_all (priv->event_box);
diff --git a/hildon/hildon-picker-dialog.c b/hildon/hildon-picker-dialog.c
index 797a549..de4edf2 100644
--- a/hildon/hildon-picker-dialog.c
+++ b/hildon/hildon-picker-dialog.c
@@ -456,9 +456,6 @@ selection_completed (HildonPickerDialog *dialog)
GList *list;
gint i, n_cols;
gboolean all_selected = TRUE;
-#ifdef MAEMO_GTK
- HildonUIMode mode = HILDON_UI_MODE_NORMAL;
-#endif
priv = HILDON_PICKER_DIALOG_GET_PRIVATE (dialog);
if (HILDON_IS_TOUCH_SELECTOR_ENTRY (priv->selector)) {
@@ -470,12 +467,6 @@ selection_completed (HildonPickerDialog *dialog)
return TRUE;
}
}
-#ifdef MAEMO_GTK
- mode = hildon_touch_selector_get_hildon_ui_mode (HILDON_TOUCH_SELECTOR (priv->selector));
- if (mode == HILDON_UI_MODE_NORMAL) {
- return TRUE;
- }
-#endif
n_cols = hildon_touch_selector_get_num_columns (HILDON_TOUCH_SELECTOR (priv->selector));
for (i = 0; i < n_cols; i++) {
list = hildon_touch_selector_get_selected_rows (HILDON_TOUCH_SELECTOR (priv->selector), i);
diff --git a/hildon/hildon-text-view.c b/hildon/hildon-text-view.c
index 4013c73..4a82cf3 100644
--- a/hildon/hildon-text-view.c
+++ b/hildon/hildon-text-view.c
@@ -93,11 +93,7 @@ hildon_text_view_button_press_event (GtkWidget *widget,
gtk_widget_grab_focus (widget);
- if (GTK_TEXT_VIEW (widget)->editable
-#ifdef MAEMO_GTK
- && hildon_gtk_im_context_filter_event (GTK_TEXT_VIEW (widget)->im_context, (GdkEvent*)event)
-#endif
- )
+ if (GTK_TEXT_VIEW (widget)->editable)
{
GTK_TEXT_VIEW (widget)->need_im_reset = TRUE;
return TRUE;
@@ -147,11 +143,7 @@ hildon_text_view_button_release_event (GtkWidget *widget,
GtkTextIter iter;
gint x, y;
- if (text_view->editable
-#ifdef MAEMO_GTK
- && hildon_gtk_im_context_filter_event (text_view->im_context, (GdkEvent*)event)
-#endif
- )
+ if (text_view->editable)
{
text_view->need_im_reset = TRUE;
return TRUE;
diff --git a/hildon/hildon-touch-selector-entry.c b/hildon/hildon-touch-selector-entry.c
index 8a7bb5d..8d1b705 100644
--- a/hildon/hildon-touch-selector-entry.c
+++ b/hildon/hildon-touch-selector-entry.c
@@ -225,9 +225,6 @@ hildon_touch_selector_entry_init (HildonTouchSelectorEntry *self)
{
HildonTouchSelectorEntryPrivate *priv;
GtkEntryCompletion *completion;
-#ifdef MAEMO_GTK
- HildonGtkInputMode input_mode;
-#endif
priv = HILDON_TOUCH_SELECTOR_ENTRY_GET_PRIVATE (self);
@@ -235,16 +232,6 @@ hildon_touch_selector_entry_init (HildonTouchSelectorEntry *self)
priv->entry = hildon_entry_new (HILDON_SIZE_FINGER_HEIGHT);
gtk_entry_set_activates_default (GTK_ENTRY (priv->entry), TRUE);
-#ifdef MAEMO_GTK
- input_mode = hildon_gtk_entry_get_input_mode (GTK_ENTRY (priv->entry));
-
- /* Disable unsupported input modes. */
- input_mode &= ~HILDON_GTK_INPUT_MODE_MULTILINE;
- input_mode &= ~HILDON_GTK_INPUT_MODE_INVISIBLE;
- input_mode &= ~HILDON_GTK_INPUT_MODE_DICTIONARY;
-
- hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry), input_mode);
-#endif
completion = gtk_entry_completion_new ();
gtk_entry_completion_set_inline_completion (completion, TRUE);
@@ -386,63 +373,6 @@ hildon_touch_selector_entry_get_text_column (HildonTouchSelectorEntry *selector)
return text_column;
}
-#ifdef MAEMO_GTK
-/**
- * hildon_touch_selector_entry_set_input_mode:
- * @selector: a #HildonTouchSelectorEntry
- * @input_mode: #HildonGtkInputMode mask
- *
- * Sets the input mode to be used in the #GtkEntry in @selector. See hildon_gtk_entry_set_input_mode()
- * for details.
- *
- * It must be noted that not all input modes are available for the
- * entry in @selector. In particular,
- * %HILDON_GTK_INPUT_MODE_MULTILINE, %HILDON_GTK_INPUT_MODE_INVISIBLE,
- * %HILDON_GTK_INPUT_MODE_DICTIONARY are disabled, since these are irrelevant
- * for #HildonTouchSelectorEntry.
- *
- * Since: 2.2
- **/
-void
-hildon_touch_selector_entry_set_input_mode (HildonTouchSelectorEntry * selector,
- HildonGtkInputMode input_mode)
-{
- HildonTouchSelectorEntryPrivate *priv;
-
- g_return_if_fail (HILDON_IS_TOUCH_SELECTOR_ENTRY (selector));
- g_return_if_fail (!(input_mode & (HILDON_GTK_INPUT_MODE_MULTILINE |
- HILDON_GTK_INPUT_MODE_INVISIBLE |
- HILDON_GTK_INPUT_MODE_DICTIONARY)));
-
- priv = HILDON_TOUCH_SELECTOR_ENTRY_GET_PRIVATE (selector);
-
- hildon_gtk_entry_set_input_mode (GTK_ENTRY (priv->entry), input_mode);
-}
-
-/**
- * hildon_touch_selector_entry_get_input_mode:
- * @selector: a #HildonTouchSelectorEntry
- *
- * Gets the input mode used in the #GtkEntry in @selector. See hildon_gtk_entry_get_input_mode()
- * for details.
- *
- * Returns: a mask of #HildonGtkInputMode
- *
- * Since: 2.2
- **/
-HildonGtkInputMode
-hildon_touch_selector_entry_get_input_mode (HildonTouchSelectorEntry * selector)
-{
- HildonTouchSelectorEntryPrivate *priv;
-
- g_return_val_if_fail (HILDON_IS_TOUCH_SELECTOR_ENTRY (selector), HILDON_GTK_INPUT_MODE_ALPHA);
-
- priv = HILDON_TOUCH_SELECTOR_ENTRY_GET_PRIVATE (selector);
-
- return hildon_gtk_entry_get_input_mode (GTK_ENTRY (priv->entry));
-}
-#endif
-
static void
entry_on_text_changed (GtkEditable * editable,
gpointer userdata)
diff --git a/hildon/hildon-touch-selector-entry.h b/hildon/hildon-touch-selector-entry.h
index b8bc4f8..e3f7b0a 100644
--- a/hildon/hildon-touch-selector-entry.h
+++ b/hildon/hildon-touch-selector-entry.h
@@ -79,15 +79,6 @@ hildon_touch_selector_entry_set_text_column (HildonTouchSelectorEntry *selec
gint
hildon_touch_selector_entry_get_text_column (HildonTouchSelectorEntry *selector);
-#ifdef MAEMO_GTK
-HildonGtkInputMode
-hildon_touch_selector_entry_get_input_mode (HildonTouchSelectorEntry * selector);
-
-void
-hildon_touch_selector_entry_set_input_mode (HildonTouchSelectorEntry * selector,
- HildonGtkInputMode input_mode);
-#endif
-
HildonEntry *
hildon_touch_selector_entry_get_entry (HildonTouchSelectorEntry * selector);
diff --git a/hildon/hildon-touch-selector.c b/hildon/hildon-touch-selector.c
index fbba81c..f6f22fe 100644
--- a/hildon/hildon-touch-selector.c
+++ b/hildon/hildon-touch-selector.c
@@ -230,18 +230,12 @@ struct _HildonTouchSelectorPrivate
HildonTouchSelectorPrintFunc print_func;
gpointer print_user_data;
GDestroyNotify print_destroy_func;
-#ifdef MAEMO_GTK
- HildonUIMode hildon_ui_mode;
-#endif
};
enum
{
PROP_HAS_MULTIPLE_SELECTION = 1,
PROP_INITIAL_SCROLL,
-#ifdef MAEMO_GTK
- PROP_HILDON_UI_MODE,
-#endif
PROP_LIVE_SEARCH
};
@@ -438,34 +432,6 @@ hildon_touch_selector_class_init (HildonTouchSelectorClass * class)
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-#ifdef MAEMO_GTK
- /**
- * HildonTouchSelector:hildon-ui-mode:
- *
- * Specifies which UI mode to use in the internal treeviews. A setting
- * of %HILDON_UI_MODE_NORMAL will cause these tree view to disable selections
- * and emit row-activated as soon as a row is pressed (unless it is pressed
- * to drag the pannable area where the treeview is). You can use the
- * method hildon_touch_selector_get_last_activated_row() to get it. When
- * %HILDON_UI_MODE_EDIT is set, selections can be made according to the
- * setting of the mode on GtkTreeSelection.
- *
- * Toggling this property will cause the tree view to select an
- * appropriate selection mode if not already done.
- *
- * Since: Hildon 2.2
- */
- g_object_class_install_property (gobject_class,
- PROP_HILDON_UI_MODE,
- g_param_spec_enum ("hildon-ui-mode",
- "Hildon UI Mode",
- "The Hildon UI mode according "
- "to which the touch selector "
- "should behave",
- HILDON_TYPE_UI_MODE,
- HILDON_UI_MODE_EDIT,
- G_PARAM_READWRITE));
-#endif
g_object_class_install_property (G_OBJECT_CLASS (gobject_class),
PROP_LIVE_SEARCH,
g_param_spec_boolean ("live-search",
@@ -501,11 +467,6 @@ hildon_touch_selector_get_property (GObject * object,
case PROP_INITIAL_SCROLL:
g_value_set_boolean (value, priv->initial_scroll);
break;
-#ifdef MAEMO_GTK
- case PROP_HILDON_UI_MODE:
- g_value_set_enum (value, priv->hildon_ui_mode);
- break;
-#endif
case PROP_LIVE_SEARCH:
g_value_set_boolean (value,
hildon_touch_selector_get_live_search (HILDON_TOUCH_SELECTOR (object)));
@@ -526,12 +487,6 @@ hildon_touch_selector_set_property (GObject *object, guint prop_id,
case PROP_INITIAL_SCROLL:
priv->initial_scroll = g_value_get_boolean (value);
break;
-#ifdef MAEMO_GTK
- case PROP_HILDON_UI_MODE:
- hildon_touch_selector_set_hildon_ui_mode (HILDON_TOUCH_SELECTOR (object),
- g_value_get_enum (value));
- break;
-#endif
case PROP_LIVE_SEARCH:
hildon_touch_selector_set_live_search (HILDON_TOUCH_SELECTOR (object),
g_value_get_boolean (value));
@@ -561,9 +516,6 @@ hildon_touch_selector_init (HildonTouchSelector * selector)
selector->priv->hbox = gtk_hbox_new (FALSE, 0);
selector->priv->changed_blocked = FALSE;
-#ifdef MAEMO_GTK
- selector->priv->hildon_ui_mode = HILDON_UI_MODE_EDIT;
-#endif
gtk_box_pack_end (GTK_BOX (selector), selector->priv->hbox,
TRUE, TRUE, 0);
@@ -691,18 +643,6 @@ hildon_touch_selector_emit_value_changed (HildonTouchSelector *selector,
}
}
-#ifdef MAEMO_GTK
-static void
-hildon_touch_selector_check_ui_mode_coherence (HildonTouchSelector *selector)
-{
- g_return_if_fail (HILDON_IS_TOUCH_SELECTOR (selector));
-
- if (hildon_touch_selector_get_num_columns (selector) > 1) {
- hildon_touch_selector_set_hildon_ui_mode (selector, HILDON_UI_MODE_EDIT);
- }
-}
-#endif
-
/**
* default_print_func:
* @selector: a #HildonTouchSelector
@@ -882,11 +822,7 @@ _create_new_column (HildonTouchSelector * selector,
}
}
-#ifdef MAEMO_GTK
- tv = GTK_TREE_VIEW (hildon_gtk_tree_view_new (selector->priv->hildon_ui_mode));
-#else
tv = GTK_TREE_VIEW (gtk_tree_view_new ());
-#endif /* MAEMO_GTK */
gtk_tree_view_set_enable_search (tv, FALSE);
@@ -918,11 +854,7 @@ _create_new_column (HildonTouchSelector * selector,
/* select the first item */
*emit_changed = FALSE;
- if ((gtk_tree_model_get_iter_first (filter, &iter))
-#ifdef MAEMO_GTK
- && (selector->priv->hildon_ui_mode == HILDON_UI_MODE_EDIT)
-#endif
- )
+ if (gtk_tree_model_get_iter_first (filter, &iter))
{
gtk_tree_selection_select_iter (selection, &iter);
*emit_changed = TRUE;
@@ -1597,9 +1529,6 @@ hildon_touch_selector_append_column (HildonTouchSelector * selector,
colnum = g_slist_length (selector->priv->columns);
hildon_touch_selector_emit_value_changed (selector, colnum);
}
-#ifdef MAEMO_GTK
- hildon_touch_selector_check_ui_mode_coherence (selector);
-#endif
return new_column;
}
@@ -2708,80 +2637,6 @@ hildon_touch_selector_optimal_size_request (HildonTouchSelector *selector,
}
-
-#ifdef MAEMO_GTK
-/**
- * hildon_touch_selector_get_hildon_ui_mode
- * @selector: a #HildonTouchSelector
- *
- * Gets the current hildon-ui-mode, see #HildonUIMode for more information
- *
- * Returns: the current hildon-ui-mode
- *
- * Since: 2.2
- **/
-HildonUIMode
-hildon_touch_selector_get_hildon_ui_mode (HildonTouchSelector *selector)
-{
- g_return_val_if_fail (HILDON_IS_TOUCH_SELECTOR (selector), HILDON_UI_MODE_EDIT);
-
- return selector->priv->hildon_ui_mode;
-}
-
-/**
- * hildon_touch_selector_set_hildon_ui_mode
- * @selector: a #HildonTouchSelector
- * @mode: a #HildonUIMode
- *
- * Sets the value of the property #HildonTouchSelector:hildon-ui-mode to be @mode,
- * see #HildonUIMode for more information
- *
- * Note that the %HILDON_UI_MODE_NORMAL can be only used when the selector has
- * one column, use the return value to check if the change was effective.
- *
- * Returns: %TRUE if #HildonTouchSelector:hildon-ui-mode was changed
- * %FALSE otherwise
- *
- * Since: 2.2
- **/
-gboolean
-hildon_touch_selector_set_hildon_ui_mode (HildonTouchSelector *selector,
- HildonUIMode mode)
-{
- gint num = 0;
- GSList *iter = NULL;
- HildonTouchSelectorColumn *column = NULL;
- GtkTreeView *tree_view = NULL;
-
- g_return_val_if_fail (HILDON_IS_TOUCH_SELECTOR (selector), FALSE);
- num = hildon_touch_selector_get_num_columns (selector);
- g_return_val_if_fail ((mode == HILDON_UI_MODE_EDIT) || (num == 1), FALSE);
-
- if (mode == selector->priv->hildon_ui_mode) {
- return FALSE;
- }
-
- for (iter = selector->priv->columns; iter; iter = g_slist_next (iter)) {
- column = HILDON_TOUCH_SELECTOR_COLUMN (iter->data);
- tree_view = column->priv->tree_view;
-
- hildon_tree_view_set_hildon_ui_mode (tree_view, mode);
-
- /* looking at the code of hildon_tree_view_set_hildon_ui_mode, it seems
- that it call the unselect_all, but it is required anyway */
- if (mode == HILDON_UI_MODE_NORMAL) {
- GtkTreeSelection *selection = gtk_tree_view_get_selection (tree_view);
-
- gtk_tree_selection_unselect_all (selection);
- }
- }
-
- selector->priv->hildon_ui_mode = mode;
-
- return TRUE;
-}
-#endif
-
/**
* hildon_touch_selector_get_last_activated_row
* @selector: a #HildonTouchSelector
diff --git a/hildon/hildon-touch-selector.h b/hildon/hildon-touch-selector.h
index 14ade39..12ef96d 100644
--- a/hildon/hildon-touch-selector.h
+++ b/hildon/hildon-touch-selector.h
@@ -216,15 +216,6 @@ void
hildon_touch_selector_optimal_size_request (HildonTouchSelector *selector,
GtkRequisition *requisition);
-#ifdef MAEMO_GTK
-HildonUIMode
-hildon_touch_selector_get_hildon_ui_mode (HildonTouchSelector *selector);
-
-gboolean
-hildon_touch_selector_set_hildon_ui_mode (HildonTouchSelector *selector,
- HildonUIMode mode);
-#endif
-
GtkTreePath*
hildon_touch_selector_get_last_activated_row (HildonTouchSelector *selector,
gint column);