[ekiga] Icons: Sanitized more icons and s/online/available.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Icons: Sanitized more icons and s/online/available.
- Date: Sat, 19 May 2012 11:58:38 +0000 (UTC)
commit 13013c838767bdca4d90249ce1295152e77172ba
Author: Damien Sandras <dsandras beip be>
Date: Sat May 19 13:56:25 2012 +0200
Icons: Sanitized more icons and s/online/available.
Drop more and more false stock icons and replace them by icon theme
icons in order to allow themeing.
ekiga.schemas.in.in | 8 ++--
lib/engine/components/echo/echo-presentity.cpp | 2 +-
lib/engine/components/opal/opal-account.cpp | 4 +-
lib/engine/gui/gtk-core/gtk-core.cpp | 8 ----
lib/engine/gui/gtk-frontend/call-window.cpp | 2 +-
lib/engine/gui/gtk-frontend/statusicon.cpp | 16 ++-------
lib/gui/gmstockicons.c | 8 ++---
lib/gui/gmstockicons.h | 4 --
.../{status-inacall.png => 16x16/user-inacall.png} | Bin 676 -> 676 bytes
.../{status-ringing.png => 16x16/user-ringing.png} | Bin 853 -> 853 bytes
pixmaps/Makefile.am | 10 ++---
plugins/loudmouth/loudmouth-presentity.cpp | 4 +-
src/common.h | 2 +-
src/gui/statusmenu.cpp | 36 ++++++++++----------
14 files changed, 39 insertions(+), 65 deletions(-)
---
diff --git a/ekiga.schemas.in.in b/ekiga.schemas.in.in
index eb71bc6..d53c1c6 100644
--- a/ekiga.schemas.in.in
+++ b/ekiga.schemas.in.in
@@ -104,7 +104,7 @@
<applyto>/apps/@PACKAGE_NAME@/general/personal_data/short_status</applyto>
<owner>Ekiga</owner>
<type>string</type>
- <default>online</default>
+ <default>available</default>
<locale name="C">
<short>Contact short status</short>
<long>The short status information</long>
@@ -115,7 +115,7 @@
<applyto>/apps/@PACKAGE_NAME@/general/personal_data/long_status</applyto>
<owner>Ekiga</owner>
<type>string</type>
- <default>I'm online using Ekiga</default>
+ <default>I'm available using Ekiga</default>
<locale name="C">
<short>Contact long status</short>
<long>The long status information</long>
@@ -144,8 +144,8 @@
</locale>
</schema>
<schema>
- <key>/schemas/apps/@PACKAGE_NAME@/general/personal_data/online_custom_status</key>
- <applyto>/apps/@PACKAGE_NAME@/general/personal_data/online_custom_status</applyto>
+ <key>/schemas/apps/@PACKAGE_NAME@/general/personal_data/available_custom_status</key>
+ <applyto>/apps/@PACKAGE_NAME@/general/personal_data/available_custom_status</applyto>
<type>list</type>
<list_type>string</list_type>
<default>[]</default>
diff --git a/lib/engine/components/echo/echo-presentity.cpp b/lib/engine/components/echo/echo-presentity.cpp
index 2722498..34aa0de 100644
--- a/lib/engine/components/echo/echo-presentity.cpp
+++ b/lib/engine/components/echo/echo-presentity.cpp
@@ -57,7 +57,7 @@ Echo::Presentity::get_name () const
const std::string
Echo::Presentity::get_presence () const
{
- return "online"; // FIXME
+ return "available"; // FIXME
}
const std::string
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index 4d58c84..b8486b8 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -542,7 +542,7 @@ Opal::Account::publish (const Ekiga::PersonalDetails& details)
{
std::string presence = details.get_presence ();
- if (presence == "online")
+ if (presence == "available")
personal_state = OpalPresenceInfo::Available;
else if (presence == "away")
personal_state = OpalPresenceInfo::Away;
@@ -754,7 +754,7 @@ Opal::Account::OnPresenceChange (OpalPresentity& /*presentity*/,
// do not change presence
break;
case OpalPresenceInfo::Available:
- new_presence = "online";
+ new_presence = "available";
if (!note.IsEmpty ()) {
if (note.Find ("dnd") != P_MAX_INDEX
|| note.Find ("meeting") != P_MAX_INDEX
diff --git a/lib/engine/gui/gtk-core/gtk-core.cpp b/lib/engine/gui/gtk-core/gtk-core.cpp
index ac819f2..8b241f4 100644
--- a/lib/engine/gui/gtk-core/gtk-core.cpp
+++ b/lib/engine/gui/gtk-core/gtk-core.cpp
@@ -47,14 +47,6 @@ Gtk::Core::Core ()
gnomemeeting_stock_icons_init ();
- icon_set = gtk_icon_factory_lookup_default (GM_STOCK_STATUS_INACALL);
- gtk_icon_factory_add (factory, "inacall", icon_set);
- gtk_icon_set_unref (icon_set);
-
- icon_set = gtk_icon_factory_lookup_default (GM_STOCK_STATUS_RINGING);
- gtk_icon_factory_add (factory, "ringing", icon_set);
- gtk_icon_set_unref (icon_set);
-
icon_set = gtk_icon_factory_lookup_default (GTK_STOCK_ADD);
gtk_icon_factory_add (factory, "add", icon_set);
gtk_icon_set_unref (icon_set);
diff --git a/lib/engine/gui/gtk-frontend/call-window.cpp b/lib/engine/gui/gtk-frontend/call-window.cpp
index 8a5a0c3..2aeb160 100644
--- a/lib/engine/gui/gtk-frontend/call-window.cpp
+++ b/lib/engine/gui/gtk-frontend/call-window.cpp
@@ -2041,7 +2041,7 @@ ekiga_call_window_update_logo (EkigaCallWindow *cw)
gtk_widget_realize (GTK_WIDGET (cw));
g_object_set (G_OBJECT (cw->priv->main_video_image),
- "icon-name", GM_ICON_AVATAR,
+ "icon-name", "avatar-default",
"pixel-size", 128,
NULL);
diff --git a/lib/engine/gui/gtk-frontend/statusicon.cpp b/lib/engine/gui/gtk-frontend/statusicon.cpp
index c2c1a50..50dd2f4 100644
--- a/lib/engine/gui/gtk-frontend/statusicon.cpp
+++ b/lib/engine/gui/gtk-frontend/statusicon.cpp
@@ -466,7 +466,6 @@ statusicon_set_inacall (StatusIcon *statusicon,
bool inacall)
{
GtkWidget *chat_window = NULL;
- GdkPixbuf *pixbuf = NULL;
g_return_if_fail (statusicon != NULL);
@@ -474,19 +473,10 @@ statusicon_set_inacall (StatusIcon *statusicon,
chat_window = GTK_WIDGET (frontend->get_chat_window ());
/* Update the status icon */
- if (inacall) {
-
- pixbuf = gtk_widget_render_icon (chat_window,
- GM_STOCK_STATUS_INACALL,
- GTK_ICON_SIZE_MENU,
- NULL);
- gtk_status_icon_set_from_pixbuf (GTK_STATUS_ICON (statusicon), pixbuf);
- g_object_unref (pixbuf);
- }
- else {
-
+ if (inacall)
+ gtk_status_icon_set_from_icon_name (GTK_STATUS_ICON (statusicon), "user-inacall");
+ else
statusicon_set_status (statusicon, statusicon->priv->status);
- }
}
static void
diff --git a/lib/gui/gmstockicons.c b/lib/gui/gmstockicons.c
index e4579cf..ca4f81d 100644
--- a/lib/gui/gmstockicons.c
+++ b/lib/gui/gmstockicons.c
@@ -58,9 +58,6 @@ gnomemeeting_stock_icons_init (void)
{
{ GM_STOCK_COLOR_BRIGHTNESS_CONTRAST, gm_color_brightness_contrast_stock_data },
- { GM_STOCK_STATUS_INACALL, gm_status_inacall_stock_data_16 },
- { GM_STOCK_STATUS_RINGING, gm_status_ringing_stock_data_16 },
-
{ GM_STOCK_MESSAGE, gm_message_stock_data},
{ GM_STOCK_CALL_PLACED, gm_call_placed_stock_data},
{ GM_STOCK_CALL_MISSED, gm_call_missed_stock_data},
@@ -86,14 +83,15 @@ gnomemeeting_stock_icons_init (void)
{ GM_ICON_BRIGHTNESS, 16, gm_brightness_16_stock_data},
{ GM_ICON_COLOURNESS, 16, gm_colourness_16_stock_data},
{ GM_ICON_CONTRAST, 16, gm_contrast_16_stock_data},
- { GM_ICON_INTERNET_GROUP_CHAT, 24, gm_internet_group_chat_24_stock_data },
{ GM_ICON_LOGO, 16, gm_logo_16_stock_data },
{ GM_ICON_LOGO, 22, gm_logo_22_stock_data },
{ GM_ICON_LOGO, 32, gm_logo_32_stock_data },
{ GM_ICON_LOGO, 48, gm_logo_48_stock_data },
{ GM_ICON_LOGO, 72, gm_logo_72_stock_data },
- { GM_ICON_AVATAR, 256, gm_avatar_256_stock_data},
{ GM_ICON_WHITENESS, 16, gm_whiteness_16_stock_data},
+ { "user-inacall", 16, gm_user_inacall_16 },
+ { "user-ringing", 16, gm_user_ringing_16 },
+
};
/* First, register honest-to-goodness custom stock icons */
diff --git a/lib/gui/gmstockicons.h b/lib/gui/gmstockicons.h
index 41d6760..7007a10 100644
--- a/lib/gui/gmstockicons.h
+++ b/lib/gui/gmstockicons.h
@@ -47,7 +47,6 @@ G_BEGIN_DECLS
#define GM_ICON_LOGO PACKAGE_NAME
#define GM_ICON_WHITENESS "stock_channel-blue"
#define GM_ICON_ADDRESSBOOK "stock_addressbook"
-#define GM_ICON_AVATAR "avatar"
/* True stock icons */
#define GM_STOCK_COLOR_BRIGHTNESS_CONTRAST "gm_color_brightness_contrast_stock"
@@ -57,9 +56,6 @@ G_BEGIN_DECLS
#define GM_STOCK_CALL_RECEIVED "gm_call_received_stock"
#define GM_STOCK_CALL_TRANSFER "gm_call_transfer_stock"
-#define GM_STOCK_STATUS_INACALL "gm_status_inacall_stock_16"
-#define GM_STOCK_STATUS_RINGING "gm_status_ringing_stock_16"
-
#define GM_STOCK_PHONE_HANG_UP_16 "gm_phone_hang_up_stock_16"
#define GM_STOCK_PHONE_PICK_UP_16 "gm_phone_pick_up_stock_16"
#define GM_STOCK_PHONE_HANG_UP_24 "gm_phone_up_stock_24"
diff --git a/pixmaps/status-inacall.png b/pixmaps/16x16/user-inacall.png
similarity index 100%
rename from pixmaps/status-inacall.png
rename to pixmaps/16x16/user-inacall.png
diff --git a/pixmaps/status-ringing.png b/pixmaps/16x16/user-ringing.png
similarity index 100%
rename from pixmaps/status-ringing.png
rename to pixmaps/16x16/user-ringing.png
diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am
index 3536a94..e146a3f 100644
--- a/pixmaps/Makefile.am
+++ b/pixmaps/Makefile.am
@@ -26,8 +26,9 @@ IMAGES_FILES= \
32x32/multimedia-headset.png \
32x32/multimedia-headset.svg \
256x256/multimedia-headset.png \
- 256x256/avatar-default.png \
16x16/audio-volume-high.png \
+ 16x16/user-inacall.png \
+ 16x16/user-ringing.png \
16x16/stock_brightness.png \
16x16/stock_channel-blue.png \
16x16/stock_color.png \
@@ -41,8 +42,6 @@ IMAGES_FILES= \
call-missed.png \
call-received.png \
call-transfer.png \
- status-inacall.png \
- status-ringing.png \
ekiga-logo.png \
24x24/phone-hang-up.png \
24x24/phone-pick-up.png \
@@ -67,7 +66,6 @@ IMAGES= \
gm_logo_32_stock_data $(srcdir)/32x32/apps/@PACKAGE_NAME png \
gm_logo_48_stock_data $(srcdir)/48x48/apps/@PACKAGE_NAME png \
gm_logo_72_stock_data $(srcdir)/72x72/apps/@PACKAGE_NAME png \
- gm_avatar_256_stock_data $(srcdir)/256x256/avatar-default.png \
gm_whiteness_16_stock_data $(srcdir)/16x16/stock_channel-blue.png \
gm_color_brightness_contrast_stock_data $(srcdir)/color-brightness-contrast.png \
gm_remote_contact_stock_data $(srcdir)/remote_contact.png \
@@ -77,8 +75,8 @@ IMAGES= \
gm_call_received_stock_data $(srcdir)/call-received.png \
gm_call_missed_stock_data $(srcdir)/call-missed.png \
gm_call_transfer_stock_data $(srcdir)/call-transfer.png \
- gm_status_inacall_stock_data_16 $(srcdir)/16x16/multimedia-headset.png \
- gm_status_ringing_stock_data_16 $(srcdir)/status-ringing.png \
+ gm_user_inacall_16 $(srcdir)/16x16/user-inacall.png \
+ gm_user_ringing_16 $(srcdir)/16x16/user-ringing.png \
gm_phone_hang_up_stock_data_24 $(srcdir)/24x24/phone-hang-up.png \
gm_phone_pick_up_stock_data_24 $(srcdir)/24x24/phone-pick-up.png \
gm_phone_hang_up_stock_data_16 $(srcdir)/16x16/phone-hang-up.png \
diff --git a/plugins/loudmouth/loudmouth-presentity.cpp b/plugins/loudmouth/loudmouth-presentity.cpp
index 4089f44..ad5bbbe 100644
--- a/plugins/loudmouth/loudmouth-presentity.cpp
+++ b/plugins/loudmouth/loudmouth-presentity.cpp
@@ -98,7 +98,7 @@ LM::Presentity::get_presence () const
}
if (best.presence == "") {
- result = "online";
+ result = "available";
} else {
result = best.presence;
@@ -247,7 +247,7 @@ LM::Presentity::push_presence (const std::string resource,
info.presence = lm_message_node_get_value (away);
} else {
- info.presence = "online";
+ info.presence = "available";
}
// FIXME: this code works but is ugly -- there has to be a better way
diff --git a/src/common.h b/src/common.h
index 5c3183a..567816d 100644
--- a/src/common.h
+++ b/src/common.h
@@ -80,7 +80,7 @@
/* Contact state */
typedef enum {
- CONTACT_ONLINE,
+ CONTACT_AVAILABLE,
CONTACT_AWAY,
CONTACT_DND,
CONTACT_INVISIBLE,
diff --git a/src/gui/statusmenu.cpp b/src/gui/statusmenu.cpp
index 0f5eeb4..7cdd3f8 100644
--- a/src/gui/statusmenu.cpp
+++ b/src/gui/statusmenu.cpp
@@ -68,15 +68,15 @@ enum Columns
enum MessageType
{
- TYPE_ONLINE, // Generic online message
+ TYPE_AVAILABLE, // Generic available message
TYPE_AWAY, // Generic away message
TYPE_BUSY, // Generic Do Not Disturb message
NUM_STATUS_TYPES,
- TYPE_CUSTOM_ONLINE, // Custom online message
+ TYPE_CUSTOM_AVAILABLE, // Custom available message
TYPE_CUSTOM_AWAY, // Custom away message
TYPE_CUSTOM_BUSY, // Custom BUSY message
NUM_STATUS_CUSTOM_TYPES,
- TYPE_CUSTOM_ONLINE_NEW, // Add new custom online message
+ TYPE_CUSTOM_AVAILABLE_NEW, // Add new custom available message
TYPE_CUSTOM_AWAY_NEW, // Add new custom away message
TYPE_CUSTOM_BUSY_NEW, // Add new custom busy message
TYPE_CLEAR // Clear custom message(s)
@@ -84,21 +84,21 @@ enum MessageType
const gchar *statuses [] =
{
- N_("Online"),
+ N_("Available"),
N_("Away"),
N_("Do Not Disturb")
};
const char* status_types_names[] =
{
- "online",
+ "available",
"away",
"busy"
};
const char* status_types_keys[] =
{
- PERSONAL_DATA_KEY "online_custom_status",
+ PERSONAL_DATA_KEY "available_custom_status",
PERSONAL_DATA_KEY "away_custom_status",
PERSONAL_DATA_KEY "busy_custom_status"
};
@@ -209,7 +209,7 @@ status_menu_clear_status_message_dialog_run (StatusMenu *self);
* messages that he will be able to publish.
*
* @param self is the StatusMenu
- * @param option is the defined message type (TYPE_CUSTOM_ONLINE,
+ * @param option is the defined message type (TYPE_CUSTOM_AVAILABLE,
* TYPE_CUSTOM_AWAY, TYPE_CUSTOM_BUSY)
*/
static void
@@ -268,8 +268,8 @@ status_menu_option_changed (GtkComboBox *box,
switch (i)
{
- case TYPE_ONLINE:
- self->priv->personal_details->set_presence_info ("online", "");
+ case TYPE_AVAILABLE:
+ self->priv->personal_details->set_presence_info ("available", "");
break;
case TYPE_AWAY:
@@ -280,8 +280,8 @@ status_menu_option_changed (GtkComboBox *box,
self->priv->personal_details->set_presence_info ("busy", "");
break;
- case TYPE_CUSTOM_ONLINE:
- self->priv->personal_details->set_presence_info ("online", status);
+ case TYPE_CUSTOM_AVAILABLE:
+ self->priv->personal_details->set_presence_info ("available", status);
break;
case TYPE_CUSTOM_AWAY:
@@ -292,8 +292,8 @@ status_menu_option_changed (GtkComboBox *box,
self->priv->personal_details->set_presence_info ("busy", status);
break;
- case TYPE_CUSTOM_ONLINE_NEW:
- status_menu_new_status_message_dialog_run (self, TYPE_CUSTOM_ONLINE);
+ case TYPE_CUSTOM_AVAILABLE_NEW:
+ status_menu_new_status_message_dialog_run (self, TYPE_CUSTOM_AVAILABLE);
break;
case TYPE_CUSTOM_AWAY_NEW:
@@ -462,13 +462,13 @@ status_menu_set_option (StatusMenu *self,
COL_MESSAGE, &sstatus, -1);
// Check if it is a custom status message and if it is in the list
- if (i == TYPE_CUSTOM_ONLINE || i == TYPE_CUSTOM_AWAY || i == TYPE_CUSTOM_BUSY) {
+ if (i == TYPE_CUSTOM_AVAILABLE || i == TYPE_CUSTOM_AWAY || i == TYPE_CUSTOM_BUSY) {
if (presence == status_types_names[i - NUM_STATUS_TYPES - 1] && status == sstatus)
break;
}
// Long status empty, the user did not set a custom message
- if (i == TYPE_ONLINE || i == TYPE_AWAY || i == TYPE_BUSY) {
+ if (i == TYPE_AVAILABLE || i == TYPE_AWAY || i == TYPE_BUSY) {
if (status.empty () && presence == status_types_names[i])
break;
}
@@ -570,7 +570,7 @@ status_menu_clear_status_message_dialog_run (StatusMenu *self)
gtk_tree_model_get (GTK_TREE_MODEL (self->priv->list_store), &iter,
COL_MESSAGE_TYPE, &i, -1);
- if (i == TYPE_CUSTOM_ONLINE || i == TYPE_CUSTOM_AWAY || i == TYPE_CUSTOM_BUSY) {
+ if (i == TYPE_CUSTOM_AVAILABLE || i == TYPE_CUSTOM_AWAY || i == TYPE_CUSTOM_BUSY) {
gtk_tree_model_get (GTK_TREE_MODEL (self->priv->list_store), &iter,
COL_ICON, &pixbuf,
@@ -638,7 +638,7 @@ status_menu_clear_status_message_dialog_run (StatusMenu *self)
if (!found) {
// Reset current config
- self->priv->personal_details->set_presence_info ("online", "");
+ self->priv->personal_details->set_presence_info ("available", "");
}
gtk_widget_destroy (dialog);
@@ -848,7 +848,7 @@ status_menu_new (Ekiga::ServiceCore & core)
g_signal_connect (self, "changed",
G_CALLBACK (status_menu_option_changed), self);
- gm_conf_notifier_add (PERSONAL_DATA_KEY "online_custom_status",
+ gm_conf_notifier_add (PERSONAL_DATA_KEY "available_custom_status",
status_menu_custom_messages_changed, self);
gm_conf_notifier_add (PERSONAL_DATA_KEY "away_custom_status",
status_menu_custom_messages_changed, self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]