[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32362 - gnunet-gtk/src/conversation
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32362 - gnunet-gtk/src/conversation |
Date: |
Mon, 17 Feb 2014 02:29:11 +0100 |
Author: hark
Date: 2014-02-17 02:29:11 +0100 (Mon, 17 Feb 2014)
New Revision: 32362
Modified:
gnunet-gtk/src/conversation/gnunet-conversation-gtk.c
Log:
cleanup a little
Modified: gnunet-gtk/src/conversation/gnunet-conversation-gtk.c
===================================================================
--- gnunet-gtk/src/conversation/gnunet-conversation-gtk.c 2014-02-17
00:43:33 UTC (rev 32361)
+++ gnunet-gtk/src/conversation/gnunet-conversation-gtk.c 2014-02-17
01:29:11 UTC (rev 32362)
@@ -25,26 +25,10 @@
* @author hark
*/
#include "gnunet-conversation-gtk_common.h"
-
-//#include "gnunet-conversation-gtk.h"
-
#include "gnunet-conversation-gtk_history.h"
#include "gnunet-conversation-gtk_contacts.h"
-//#include "gnunet-conversation-gtk_phone.h"
-/***********
- * macro's *
- ***********/
-
-//#define UPDATE_STATUS(format, ...) update_status(g_strdup_printf (format, ##
__VA_ARGS__))
-
-//#define UPDATE_INFOBAR(format, ...) set_infobar_text(g_strdup_printf
(format, ## __VA_ARGS__))
-
-//#define get_object(name) GNUNET_CONVERSATION_GTK_get_main_window_object(name)
-
-//#define LOG(format, ...) log_message(g_strdup_printf (format, ##
__VA_ARGS__))
-
struct GNUNET_CONVERSATION_Caller *caller_selected = NULL;
/*************
* common *
@@ -63,14 +47,12 @@
* Our configurations.
*/
static struct GNUNET_CONFIGURATION_Handle *cfg;
+
/**
* Name of our ego.
*/
static char *ego_name;
-
-//static struct GNUNET_CONFIGURATION_Handle *cfg1;
-//static struct GNUNET_CONFIGURATION_Handle *cfg2;
/**
* Be verbose.
*/
@@ -82,18 +64,7 @@
*/
static int tray_only;
-/**
- * Head of operations.
- */
-//static struct OperationContext *oc_head;
-/**
- * Tail of operations.
- */
-//static struct OperationContext *oc_tail;
-
-
-
/*************
* phone *
*************/
@@ -110,28 +81,20 @@
char *callerName;
/**
-* peer id of a contact
-*/
+ * peer id of a contact
+ */
char *peer_id;
/**
-* incoming call popup window, global because must be destroyed when other end
hangs up
-*/
-GtkDialog *dialog;
-
-/**
* List of active calls
*/
- static GtkListStore *active_liststore;
+static GtkListStore *active_liststore;
- /**
- * List of active calls
- */
- static GtkTreeView *active_treeview;
+/**
+ * List of active calls
+ */
+static GtkTreeView *active_treeview;
-
-
-
/**
* List of incoming calls
*/
@@ -170,8 +133,6 @@
};
-
-
/**
* Phone handle
*/
@@ -181,46 +142,33 @@
* Call handle (for active outgoing call).
*/
static struct GNUNET_CONVERSATION_Call *call;
-//static struct GtkTreeIter gcall;
/**
* Caller handle (for active incoming call).
*/
static struct CallList *cl_active;
-//static GtkTreeIter gcl_active;
/**
* Head of calls waiting to be accepted.
*/
static struct CallList *cl_head;
-//gtk
-//static GtkTreeIter gcl_head;
/**
- * currently selected call
- */
-//static GtkTreeIter gcl_selected;
-
-/**
* Tail of calls waiting to be accepted.
*/
static struct CallList *cl_tail;
-//static GtkTreeIter gcl_tail;
/**
* Desired phone line.
*/
static unsigned int line;
-//static unsigned int line1;
/**
* debug box enabled
*/
static unsigned int debug_box_enabled;
-
-
/**
* Our speaker.
*/
@@ -260,6 +208,7 @@
* GNS address for this phone.
*/
static char *address;
+
/*******************
* identity select *
*******************/
@@ -271,11 +220,6 @@
static GtkListStore *zone_liststore;
/**
- * zone treestore
- */
-static GtkTreeStore *zone_treestore;
-
-/**
* zone treeview
*/
static GtkTreeView *zone_treeview;
@@ -285,13 +229,7 @@
*/
static GtkTreeModel *zone_treemodel;
-
/**
- * Global return value
- */
-static int ret;
-
-/**
* Our ego.
*/
static struct GNUNET_IDENTITY_Ego *caller_id;
@@ -302,22 +240,17 @@
*/
static struct GNUNET_GTK_MainLoop *ml;
-
-
-
-
-//////////////////////////////////////////////////
/************
* extern's *
* **********/
/**
- * * Get an object from the main window.
- * *
- * * @param name name of the object
- * * @return NULL on error
- * */
+ * Get an object from the main window.
+ *
+ * @param name name of the object
+ * @return NULL on error
+ */
extern GObject *
GNUNET_CONVERSATION_GTK_get_main_window_object (const char *name)
{
@@ -1364,8 +1297,8 @@
GNUNET_CONVERSATION_GTK_history_init();
- zone_treeview =
- GTK_TREE_VIEW (get_object ("gnunet_conversation_gtk_zone_treeview"));
+ //zone_treeview =
+ // GTK_TREE_VIEW (get_object ("gnunet_conversation_gtk_zone_treeview"));
//gtk_tree_view_set_activate_on_single_click(contacts_treeview, TRUE);
@@ -1393,10 +1326,8 @@
}
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
NULL);
-
-
+
cfg = GIG_get_configuration ();
-//cfg = GNUNET_CONFIGURATION_dup (c);
speaker = GNUNET_SPEAKER_create_from_hardware (GIG_get_configuration ());
mic = GNUNET_MICROPHONE_create_from_hardware (GIG_get_configuration ());
@@ -1409,7 +1340,7 @@
}
id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL);
- //GNUNET_CONVERSATION_GTK_CONTACTS_init ();
+ GNUNET_CONVERSATION_GTK_CONTACTS_init ();
}
@@ -1450,7 +1381,6 @@
&run))
return 1;
return 0;
-// FPRINTF (stderr, "line %i", line);
}
/**
@@ -1472,40 +1402,28 @@
}
/**
- * clicked
+ * hangup clicked
*/
void
GNUNET_CONVERSATION_GTK_on_hangup_clicked ()
{
- //update_status()
- //disable_button("GNUNET_CONVERSATION_GTK_call_button");
- //FPRINTF (stderr, "hangup clicked \n");
-
-// enable_button ("GNUNET_GTK_conversation_call_button");
-
-
- //FPRINTF (stderr, "hangup clicked \n");
-
do_reject (caller_selected);
-
do_status ();
//history_add(3,peer_name);
}
/**
- * clicked
+ * accept clicked
*/
void
GNUNET_CONVERSATION_GTK_on_accept_clicked ()
{
- //FPRINTF (stderr, "accept clicked \n");
do_accept (caller_selected);
- // hide_infobar ();
}
/**
- * clicked
+ * reject clicked
*/
void
GNUNET_CONVERSATION_GTK_on_reject_clicked ()
@@ -1514,7 +1432,7 @@
}
/**
- * clicked
+ * pause clicked
*/
void
GNUNET_CONVERSATION_GTK_on_pause_clicked ()
@@ -1523,7 +1441,7 @@
}
/**
- * clicked
+ * resume clicked
*/
void
GNUNET_CONVERSATION_GTK_on_resume_clicked ()
@@ -1532,7 +1450,7 @@
}
/**
- * clicked
+ * status clicked
*/
void
GNUNET_CONVERSATION_GTK_on_status_clicked ()
@@ -1540,22 +1458,12 @@
do_status ();
}
-
-
-/* end of gnunet-conversation-gtk.c */
+/*
+ * test function
+ */
void
GNUNET_contact_test ()
{
-/*
- history_add (0, "test");
- history_add (1, "test");
- history_add (2, "test");
- history_add (3, "test");
- history_add (4, "test");
-// struct GNUNET_GTK_NAMESTORE_PluginEnvironment *edc;
-// edc = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginEnvironment);
-*/
-
GtkTreeIter iter;
char *caller_id = "testje";
int caller_num = 10;
@@ -1573,30 +1481,26 @@
&iter, -1,
0, "test",
-1);
-// static struct GNUNET_IDENTITY_Handle *sh;
-// GNUNET_IDENTITY_disconnect (id);
-// &print_ego;
-//sh = GNUNET_IDENTITY_connect (cfg, &print_ego, NULL);
-// GNUNET_NAMESTORE_zone_iterator_next(list_it);
}
-
+/*
+ * @brief outgoing ego selector changed
+ */
void
gnunet_conversation_gtk_outgoing_zone_combobox_changed_cb (GtkComboBox *widget,
gpointer user_data)
{
- GtkTreeIter contacts_zone_iter;
+ GtkTreeIter iter;
struct GNUNET_IDENTITY_Ego *tempEgo;
char *tempName;
struct GNUNET_CRYPTO_EcdsaPrivateKey temp_zone_pkey;
GtkTreeSelection *selection;
- GtkTreeIter iterA;
- gtk_combo_box_get_active_iter(widget, &contacts_zone_iter);
+ gtk_combo_box_get_active_iter(widget, &iter);
gtk_tree_model_get (GTK_TREE_MODEL (zone_liststore),
- &contacts_zone_iter,
+ &iter,
0, &tempName,
1, &tempEgo,
-1);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32362 - gnunet-gtk/src/conversation,
gnunet <=