From 10901f7dcb422cf80cfcdce2db7efad5f9197619 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 20 Oct 2010 22:37:54 +0200 Subject: Edit window --- src/c-main-window.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/c-main-window.c') diff --git a/src/c-main-window.c b/src/c-main-window.c index 43d4f86..e1487dc 100644 --- a/src/c-main-window.c +++ b/src/c-main-window.c @@ -24,6 +24,8 @@ static void c_main_window_on_selection_changed(GtkTreeSelection *selection, static void c_main_window_on_add_clicked(GtkWidget *widget, gpointer user_data); static void c_main_window_on_remove_clicked(GtkWidget *widget, gpointer user_data); +static void c_main_window_on_edit_clicked(GtkWidget *widget, + gpointer user_data); GtkWidget *c_main_window_new(void) { @@ -175,6 +177,17 @@ static void c_main_window_init(CMainWindow *window) (gpointer)window); gtk_box_pack_start(GTK_BOX(hbuttonbox), window->add_button, FALSE, FALSE, 0); + window->edit_button = + hildon_button_new_with_text(HILDON_SIZE_AUTO_WIDTH | + HILDON_SIZE_FINGER_HEIGHT, + HILDON_BUTTON_ARRANGEMENT_HORIZONTAL, + "Edit", + NULL); + g_signal_connect(window->edit_button, "clicked", + G_CALLBACK(c_main_window_on_edit_clicked), + (gpointer)window); + gtk_box_pack_start(GTK_BOX(hbuttonbox), window->edit_button, FALSE, FALSE, 0); + window->remove_button = hildon_button_new_with_text(HILDON_SIZE_AUTO_WIDTH | HILDON_SIZE_FINGER_HEIGHT, @@ -306,3 +319,14 @@ static void c_main_window_on_remove_clicked(GtkWidget *widget, } } } + +static void c_main_window_on_edit_clicked(GtkWidget *widget, + gpointer user_data) +{ + CMainWindow *self; + + self = (CMainWindow *)user_data; + + /* TODO: Place more code here */ + interface_show_edit_window(); +} -- cgit v1.2.3-54-g00ecf