Split the desktop code to new files.
[tweakr] / maemo-tweaks.c
1 /*
2  * vim:ts=4:sw=4:et:cindent:cino=(0
3  */ 
4
5 #include <hildon-cp-plugin/hildon-cp-plugin-interface.h>
6 #include <gtk/gtk.h>
7
8 #include "maemo-tweaks-desktop.h"
9
10 GtkWidget *create_dialog (GtkWindow *parent)
11 {
12     GtkWidget *dialog;
13     GtkWidget *box;
14
15     dialog = gtk_dialog_new_with_buttons
16         ("Maemo 5 Tweaks",
17          parent,
18          GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR,
19          GTK_STOCK_OK,
20          GTK_RESPONSE_OK,
21          GTK_STOCK_CANCEL,
22          GTK_RESPONSE_CANCEL,
23          NULL);
24
25     box = GTK_DIALOG (dialog)->vbox;
26     gtk_box_pack_start (GTK_BOX (box),
27                         maemo_tweaks_desktop_create_snap_to_grid (),
28                         TRUE, TRUE, 0);
29
30     return dialog;
31 }
32
33
34 osso_return_t execute (osso_context_t *osso, gpointer data,
35                        gboolean user_activated)
36 {
37     GtkWidget *dialog;
38     gint response;
39
40     dialog = create_dialog (GTK_WINDOW (data));
41     response = gtk_dialog_run (GTK_DIALOG (dialog));
42     if (response == GTK_RESPONSE_OK)
43     {
44     }
45
46     gtk_widget_destroy (GTK_WIDGET (dialog));
47     return OSSO_OK;
48 }
49