[GnomeMeeting-devel-list] [PRE-PATCH] private calls history
- From: PUYDT Julien <julien puydt laposte net>
- To: GnomeMeeting Devel Liste <gnomemeeting-devel-list gnome org>
- Subject: [GnomeMeeting-devel-list] [PRE-PATCH] private calls history
- Date: Mon, 26 Jan 2004 20:59:27 +0100
Hi,
this pre-patch makes GmCallsHistoryWindow private.
Why isn't it a patch?
1) I don't like the function I had to add... neither its name nor its
principle ;
2) I didn't comment it properly ;
3) I'm wondering if I shouldn't also take all calls-history related
code, and stuff it into calls_history_window.*
Any opinion?
Snark
PS: it is compatible with private_text_chat.patch
diff -ur gnomemeeting-cvs-20040126.CVS/src/common.h gnomemeeting-cvs-20040126.CVS.patched/src/common.h
--- gnomemeeting-cvs-20040126.CVS/src/common.h 2004-01-24 23:27:39.000000000 +0100
+++ gnomemeeting-cvs-20040126.CVS.patched/src/common.h 2004-01-26 20:15:06.000000000 +0100
@@ -122,7 +122,6 @@
typedef struct _GmLdapWindowPage GmLdapWindowPage;
typedef struct _GmTextChat GmTextChat;
typedef struct _GmDruidWindow GmDruidWindow;
-typedef struct _GmCallsHistoryWindow GmCallsHistoryWindow;
typedef struct _GmRtpData GmRtpData;
@@ -293,13 +292,6 @@
};
-struct _GmCallsHistoryWindow
-{
- GtkListStore *given_calls_list_store;
- GtkListStore *received_calls_list_store;
- GtkListStore *missed_calls_list_store;
-};
-
struct _GmPrefWindow
{
diff -ur gnomemeeting-cvs-20040126.CVS/src/gnomemeeting.h gnomemeeting-cvs-20040126.CVS.patched/src/gnomemeeting.h
--- gnomemeeting-cvs-20040126.CVS/src/gnomemeeting.h 2004-01-20 12:46:57.000000000 +0100
+++ gnomemeeting-cvs-20040126.CVS.patched/src/gnomemeeting.h 2004-01-26 20:33:02.000000000 +0100
@@ -41,7 +41,7 @@
#include "common.h"
#include "endpoint.h"
-
+#include "tools.h"
/**
* COMMON NOTICE: The Application must be initialized with Init after its
diff -ur gnomemeeting-cvs-20040126.CVS/src/ldap_window.cpp gnomemeeting-cvs-20040126.CVS.patched/src/ldap_window.cpp
--- gnomemeeting-cvs-20040126.CVS/src/ldap_window.cpp 2004-01-25 18:27:50.000000000 +0100
+++ gnomemeeting-cvs-20040126.CVS.patched/src/ldap_window.cpp 2004-01-26 20:21:58.000000000 +0100
@@ -285,9 +285,7 @@
model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
/* The source can be either the addressbook OR the calls history */
- if (src_model == GTK_TREE_MODEL (chw->given_calls_list_store)
- || src_model == GTK_TREE_MODEL (chw->received_calls_list_store)
- || src_model == GTK_TREE_MODEL (chw->missed_calls_list_store)) {
+ if (is_model_from_calls_history (chw, src_model)) {
src_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (src_widget));
diff -ur gnomemeeting-cvs-20040126.CVS/src/tools.cpp gnomemeeting-cvs-20040126.CVS.patched/src/tools.cpp
--- gnomemeeting-cvs-20040126.CVS/src/tools.cpp 2004-01-24 23:27:40.000000000 +0100
+++ gnomemeeting-cvs-20040126.CVS.patched/src/tools.cpp 2004-01-26 20:40:42.000000000 +0100
@@ -49,6 +49,19 @@
#include "gnome_prefs_window.h"
#include "stock-icons.h"
+struct _GmCallsHistoryWindowPrivate
+{
+ GtkListStore *given_calls_list_store;
+ GtkListStore *received_calls_list_store;
+ GtkListStore *missed_calls_list_store;
+};
+
+gboolean is_model_from_calls_history (GmCallsHistoryWindow *chw, GtkTreeModel *model)
+{
+ return model == GTK_TREE_MODEL (chw->internal->given_calls_list_store)
+ || model == GTK_TREE_MODEL (chw->internal->received_calls_list_store)
+ || model == GTK_TREE_MODEL (chw->internal->missed_calls_list_store);
+}
extern GtkWidget *gm;
@@ -220,9 +233,9 @@
GSList *calls_list = NULL;
- GmCallsHistoryWindow *chw = NULL;
+ GmCallsHistoryWindowPrivate *chw = NULL;
- chw = GnomeMeeting::Process ()->GetCallsHistoryWindow ();
+ chw = GnomeMeeting::Process ()->GetCallsHistoryWindow ()->internal;
for (int i = 0 ; i < MAX_VALUE_CALL ; i++) {
@@ -500,9 +513,10 @@
G_CALLBACK (contact_clicked_cb), GINT_TO_POINTER (1));
}
- chw->received_calls_list_store = list_store [0];
- chw->given_calls_list_store = list_store [1];
- chw->missed_calls_list_store = list_store [2];
+ chw->internal = new GmCallsHistoryWindowPrivate ();
+ chw->internal->received_calls_list_store = list_store [0];
+ chw->internal->given_calls_list_store = list_store [1];
+ chw->internal->missed_calls_list_store = list_store [2];
g_signal_connect_swapped (GTK_OBJECT (window),
"response",
diff -ur gnomemeeting-cvs-20040126.CVS/src/tools.h gnomemeeting-cvs-20040126.CVS.patched/src/tools.h
--- gnomemeeting-cvs-20040126.CVS/src/tools.h 2004-01-25 18:27:52.000000000 +0100
+++ gnomemeeting-cvs-20040126.CVS.patched/src/tools.h 2004-01-26 20:24:03.000000000 +0100
@@ -49,8 +49,20 @@
MAX_VALUE_CALL // hackish... sorry... just keep it last
};
+typedef struct _GmCallsHistoryWindow GmCallsHistoryWindow;
+typedef struct _GmCallsHistoryWindowPrivate GmCallsHistoryWindowPrivate;
+
+struct _GmCallsHistoryWindow
+{
+ GmCallsHistoryWindowPrivate *internal;
+};
+
+
+
/* The functions */
+gboolean is_model_from_calls_history (GmCallsHistoryWindow *chw, GtkTreeModel *model);
+
/* DESCRIPTION : /
* BEHAVIOR : Build the calls history window and returns a pointer to it.
* PRE : /
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]