ekiga r7385 - in branches/gnome-2-24: . src/endpoints src/gui
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7385 - in branches/gnome-2-24: . src/endpoints src/gui
- Date: Tue, 18 Nov 2008 21:09:22 +0000 (UTC)
Author: dsandras
Date: Tue Nov 18 21:09:22 2008
New Revision: 7385
URL: http://svn.gnome.org/viewvc/ekiga?rev=7385&view=rev
Log:
Fixed previous commit.
Modified:
branches/gnome-2-24/ChangeLog
branches/gnome-2-24/src/endpoints/sip-endpoint.cpp
branches/gnome-2-24/src/gui/main.cpp
branches/gnome-2-24/src/gui/statusmenu.cpp
Modified: branches/gnome-2-24/src/endpoints/sip-endpoint.cpp
==============================================================================
--- branches/gnome-2-24/src/endpoints/sip-endpoint.cpp (original)
+++ branches/gnome-2-24/src/endpoints/sip-endpoint.cpp Tue Nov 18 21:09:22 2008
@@ -1125,7 +1125,7 @@
// to indicate the presence status did not change, hence we do nothing.
if (presence != "unknown" && (old_presence != presence || old_status != status)) {
uri_presences[_uri] = std::pair<std::string, std::string> (presence, status);
- runtime->run_in_main (sigc::bind (sigc::ptr_fun (presence_status_in_main), this, _uri, presence, status));
+ runtime.run_in_main (sigc::bind (sigc::ptr_fun (presence_status_in_main), this, _uri, presence, status));
}
}
Modified: branches/gnome-2-24/src/gui/main.cpp
==============================================================================
--- branches/gnome-2-24/src/gui/main.cpp (original)
+++ branches/gnome-2-24/src/gui/main.cpp Tue Nov 18 21:09:22 2008
@@ -1705,7 +1705,7 @@
gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), FALSE);
item = gtk_tool_item_new ();
- mw->status_option_menu = status_menu_new (*mw->core);
+ mw->status_option_menu = status_menu_new (mw->core);
status_menu_set_parent_window (STATUS_MENU (mw->status_option_menu),
GTK_WINDOW (main_window));
gtk_container_add (GTK_CONTAINER (item), mw->status_option_menu);
Modified: branches/gnome-2-24/src/gui/statusmenu.cpp
==============================================================================
--- branches/gnome-2-24/src/gui/statusmenu.cpp (original)
+++ branches/gnome-2-24/src/gui/statusmenu.cpp Tue Nov 18 21:09:22 2008
@@ -58,7 +58,9 @@
struct _StatusMenuPrivate
{
- gmref_ptr<Ekiga::PersonalDetails> personal_details;
+ _StatusMenuPrivate (Ekiga::PersonalDetails & d) : personal_details (d) {};
+
+ Ekiga::PersonalDetails & personal_details;
std::vector<sigc::connection> connections;
GtkListStore *list_store; // List store storing the menu
@@ -276,27 +278,27 @@
switch (i)
{
case TYPE_ONLINE:
- self->priv->personal_details->set_presence_info ("online", "");
+ self->priv->personal_details.set_presence_info ("online", "");
break;
case TYPE_AWAY:
- self->priv->personal_details->set_presence_info ("away", "");
+ self->priv->personal_details.set_presence_info ("away", "");
break;
case TYPE_DND:
- self->priv->personal_details->set_presence_info ("dnd", "");
+ self->priv->personal_details.set_presence_info ("dnd", "");
break;
case TYPE_CUSTOM_ONLINE:
- self->priv->personal_details->set_presence_info ("online", status);
+ self->priv->personal_details.set_presence_info ("online", status);
break;
case TYPE_CUSTOM_AWAY:
- self->priv->personal_details->set_presence_info ("away", status);
+ self->priv->personal_details.set_presence_info ("away", status);
break;
case TYPE_CUSTOM_DND:
- self->priv->personal_details->set_presence_info ("dnd", status);
+ self->priv->personal_details.set_presence_info ("dnd", status);
break;
case TYPE_CUSTOM_ONLINE_NEW:
@@ -352,7 +354,7 @@
static void
on_details_updated (StatusMenu *self)
{
- status_menu_set_option (self, self->priv->personal_details->get_presence (), self->priv->personal_details->get_status ());
+ status_menu_set_option (self, self->priv->personal_details.get_presence (), self->priv->personal_details.get_status ());
}
@@ -442,7 +444,7 @@
g_object_unref (icon);
}
- status_menu_set_option (self, self->priv->personal_details->get_presence (), self->priv->personal_details->get_status ());
+ status_menu_set_option (self, self->priv->personal_details.get_presence (), self->priv->personal_details.get_status ());
}
@@ -646,7 +648,7 @@
if (!found) {
// Reset current config
- self->priv->personal_details->set_presence_info ("online", "");
+ self->priv->personal_details.set_presence_info ("online", "");
}
gtk_widget_destroy (dialog);
@@ -714,7 +716,7 @@
if (strcmp (message, "")) {
clist = g_slist_append (clist, g_strdup (message));
gm_conf_set_string_list (status_types_keys[option - NUM_STATUS_TYPES - 1], clist);
- self->priv->personal_details->set_presence_info (status_types_names[option - NUM_STATUS_TYPES - 1], message);
+ self->priv->personal_details.set_presence_info (status_types_names[option - NUM_STATUS_TYPES - 1], message);
}
else {
status_menu_set_option (self, presence, status);
@@ -809,15 +811,16 @@
status_menu_new (Ekiga::ServiceCore & core)
{
StatusMenu *self = NULL;
+ Ekiga::PersonalDetails *details = NULL;
sigc::connection conn;
GtkCellRenderer *renderer = NULL;
GSList *custom_status_array [NUM_STATUS_TYPES];
self = (StatusMenu *) g_object_new (STATUS_MENU_TYPE, NULL);
- self->priv = new StatusMenuPrivate ();
+ details = dynamic_cast<Ekiga::PersonalDetails*> (core.get ("personal-details"));
+ self->priv = new StatusMenuPrivate (*details);
- self->priv->personal_details = core.get ("personal-details");
self->priv->parent = NULL;
self->priv->list_store = gtk_list_store_new (NUM_COLUMNS,
GDK_TYPE_PIXBUF,
@@ -857,7 +860,7 @@
(GtkTreeViewRowSeparatorFunc) status_menu_row_is_separator,
NULL, NULL);
gtk_container_set_border_width (GTK_CONTAINER (self), 0);
- status_menu_set_option (self, self->priv->personal_details->get_presence (), self->priv->personal_details->get_status ());
+ status_menu_set_option (self, self->priv->personal_details.get_presence (), self->priv->personal_details.get_status ());
g_signal_connect (G_OBJECT (self), "changed",
G_CALLBACK (status_menu_option_changed), self);
@@ -869,7 +872,7 @@
gm_conf_notifier_add (PERSONAL_DATA_KEY "dnd_custom_status",
status_menu_custom_messages_changed, self);
- conn = self->priv->personal_details->updated.connect (sigc::bind (sigc::ptr_fun (on_details_updated), self));
+ conn = self->priv->personal_details.updated.connect (sigc::bind (sigc::ptr_fun (on_details_updated), self));
self->priv->connections.push_back (conn);
return GTK_WIDGET (self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]