aboutsummaryrefslogtreecommitdiffstats
path: root/src/c-main-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c-main-window.c')
-rw-r--r--src/c-main-window.c24
1 files changed, 24 insertions, 0 deletions
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();
+}