[GnomeMeeting-devel-list] [PATCH] clear history
- From: PUYDT Julien <julien puydt laposte net>
- To: GnomeMeeting Devel Liste <gnomemeeting-devel-list gnome org>
- Subject: [GnomeMeeting-devel-list] [PATCH] clear history
- Date: Fri, 23 Jan 2004 18:05:00 +0100
Hi,
this patch adds a "clear" button to the history window.
Snark
diff -ur gnomemeeting-cvs-20040122.CVS/src/tools.cpp gnomemeeting-cvs-20040122.CVS.patched/src/tools.cpp
--- gnomemeeting-cvs-20040122.CVS/src/tools.cpp 2004-01-21 14:02:25.000000000 +0100
+++ gnomemeeting-cvs-20040122.CVS.patched/src/tools.cpp 2004-01-23 17:41:22.000000000 +0100
@@ -341,6 +341,23 @@
g_slist_free (calls_list);
}
+#define CLOSE_BUTTON_ID 0
+#define CLEAR_BUTTON_ID 1
+
+void
+gnomemeeting_calls_history_window_response_event (GtkDialog *dialog, gint id, gpointer window)
+{
+ switch (id) {
+ case CLOSE_BUTTON_ID:
+ gnomemeeting_window_hide (GTK_WIDGET (window));
+ break;
+ case CLEAR_BUTTON_ID:
+ gconf_set_string_list (USER_INTERFACE_KEY "calls_history_window/received_calls_history", NULL);
+ gconf_set_string_list (USER_INTERFACE_KEY "calls_history_window/placed_calls_history", NULL);
+ gconf_set_string_list (USER_INTERFACE_KEY "calls_history_window/missed_calls_history", NULL);
+ break;
+ }
+}
GtkWidget *
gnomemeeting_calls_history_window_new (GmCallsHistoryWindow *chw)
@@ -370,7 +387,8 @@
window = gtk_dialog_new ();
- gtk_dialog_add_button (GTK_DIALOG (window), GTK_STOCK_CLOSE, 0);
+ gtk_dialog_add_button (GTK_DIALOG (window), GTK_STOCK_CLEAR, CLEAR_BUTTON_ID);
+ gtk_dialog_add_button (GTK_DIALOG (window), GTK_STOCK_CLOSE, CLOSE_BUTTON_ID);
g_object_set_data_full (G_OBJECT (window), "window_name",
g_strdup ("calls_history_window"), g_free);
@@ -490,7 +508,7 @@
g_signal_connect_swapped (GTK_OBJECT (window),
"response",
- G_CALLBACK (gnomemeeting_window_hide),
+ G_CALLBACK (gnomemeeting_calls_history_window_response_event),
(gpointer) window);
g_signal_connect_swapped (GTK_OBJECT (window),
@@ -596,7 +614,6 @@
return window;
}
-
GtkWidget *
gnomemeeting_history_window_new ()
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]