#include <glib/gi18n.h>
#include <string.h>
#include <gtk/gtk.h>
-#include <gtk/gtktext.h>
#include <gdk/gdkkeysyms.h>
#include "utils.h"
gpointer data;
GSList *prefs_pages;
- GtkDestroyNotify func;
+ GDestroyNotify func;
};
struct _PrefsTreeNode
}
}
-#ifdef MAEMO
+#ifdef GENERIC_UMPC
static void prefs_show_sections(PrefsWindow *prefswindow)
{
gint max;
PrefsWindow *prefswindow = (PrefsWindow *) user_data;
save_all_pages(prefswindow->prefs_pages);
-#ifdef MAEMO
+#ifdef GENERIC_UMPC
prefs_show_sections(prefswindow);
#endif
}
{
PrefsWindow *prefswindow = (PrefsWindow *) user_data;
-#ifdef MAEMO
+#ifdef GENERIC_UMPC
save_all_pages(prefswindow->prefs_pages);
#endif
close_prefs_window(prefswindow);
(GTK_TREE_VIEW(tree_view)));
GSList *cur;
gint index; /* index in pages list */
-#ifndef MAEMO
+#ifndef GENERIC_UMPC
GtkTreeSelection *selection;
GtkTreeIter iter;
#endif
prefswindow_build_all_pages(prefswindow, prefs_pages);
/* select first one or its first child if necessary */
-#ifndef MAEMO
+#ifndef GENERIC_UMPC
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view));
if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter)) {
if (activate_child && gtk_tree_model_iter_has_child(GTK_TREE_MODEL(store), &iter)) {
}
void prefswindow_open_full(const gchar *title, GSList *prefs_pages,
- gpointer data, GtkDestroyNotify func,
+ gpointer data, GDestroyNotify func,
gint *save_width, gint *save_height,
gboolean preload_pages, gboolean activate_child,
PrefsOpenCallbackFunc open_cb,
gtk_widget_grab_focus(prefswindow->tree_view);
-#ifndef MAEMO
+#ifndef GENERIC_UMPC
gtkut_stock_button_set_create(&prefswindow->confirm_area,
&prefswindow->apply_btn, GTK_STOCK_APPLY,
&prefswindow->cancel_btn, GTK_STOCK_CANCEL,
gtk_box_pack_start(GTK_BOX(prefswindow->vbox), prefswindow->confirm_area, FALSE, FALSE, 0);
-#ifndef MAEMO
+#ifndef GENERIC_UMPC
g_signal_connect(G_OBJECT(prefswindow->ok_btn), "clicked",
G_CALLBACK(ok_button_clicked), prefswindow);
g_signal_connect(G_OBJECT(prefswindow->cancel_btn), "clicked",
*(prefswindow->save_height));
}
-#ifdef MAEMO
+#ifdef GENERIC_UMPC
prefs_show_sections(prefswindow);
#endif
gtk_widget_show(prefswindow->window);
GtkTreeIter iter;
GtkAdjustment *adj;
-#ifndef MAEMO
+ if (gtk_tree_path_get_depth(path) < 2)
+ return FALSE;
+#ifndef GENERIC_UMPC
if (currently_selected)
return TRUE;
#endif
gtk_adjustment_set_value(adj, adj->lower);
gtk_adjustment_changed(adj);
-#ifdef MAEMO
+#ifdef GENERIC_UMPC
prefs_show_page(prefswindow);
#endif
return TRUE;