aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-widget-generic.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-07-20 23:26:30 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-07-20 23:26:30 +0800
commit73a749cafbd78b45494aa5eba645ef2fe9c4e21a (patch)
treee6e17735f1c117203bf934ede853927a05201f92 /libempathy-gtk/empathy-account-widget-generic.c
parentf2e322a3395fc21c533833cd5b9fffb0cc677e3f (diff)
downloadgsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.tar
gsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.tar.gz
gsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.tar.bz2
gsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.tar.lz
gsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.tar.xz
gsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.tar.zst
gsoc2013-empathy-73a749cafbd78b45494aa5eba645ef2fe9c4e21a.zip
Initial room list support. It does not works yet.
2007-07-20 Xavier Claessens <xclaesse@gmail.com> * libempathy/Makefile.am: * libempathy/empathy-tp-roomlist.h: * libempathy/empathy-tp-roomlist.c: * libempathy-gtk/empathy-chatrooms-window.c: * libempathy-gtk/empathy-new-chatroom-dialog.c: Initial room list support. It does not works yet. * libempathy-gtk/empathy-account-widget-generic.c: Add support for all types of integer and float. Fixes bug #457740 (Jamey Hicks). * libempathy/empathy-tp-chat.c: * libempathy-gtk/empathy-chat.c: If there is an error sending a message, show an error message to the user. * libempathy-gtk/empathy-accounts-dialog.c: Fix a leak, profile should be unrefed after mc_account_get_profile. * libempathy/empathy-utils.c: * libempathy/empathy-utils.h: * libempathy/empathy-tp-chatroom.c: * libempathy/empathy-tp-group.h: * libempathy/empathy-tp-group.c: * src/empathy.c: Rename empathy_get_channel_id() to empathy_inspect_channel(). We now have empathy_inspect_handle(). * po/POTFILES.in: * libempathy/empathy-tp-contact-list.c: Set all contacts from salut protocol to the "Local Network" group. * libempathy/empathy-idle.c: Fix NetworkManager support. * libempathy/empathy-chatroom.h: Fix indentation. * libempathy-gtk/empathy-status-icon.c: * libempathy-gtk/empathy-ui-utils.c: * libempathy-gtk/empathy-ui-utils.h: - Iconify main window to the status icon like in rhythmbox. Fixes bug #458106 (Jaap A. Haitsma). - Rounded avatars. Fixes bug #457992 (Raphael Slinckx) * Makefile.am: Fix distcheck for gtkdoc (Vincent Untz) * data/empathy.desktop.in.in: Change application description (Jaap A. Haitsma). svn path=/trunk/; revision=190
Diffstat (limited to 'libempathy-gtk/empathy-account-widget-generic.c')
-rw-r--r--libempathy-gtk/empathy-account-widget-generic.c38
1 files changed, 32 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-account-widget-generic.c b/libempathy-gtk/empathy-account-widget-generic.c
index 1ba38f7fb..c97b6561e 100644
--- a/libempathy-gtk/empathy-account-widget-generic.c
+++ b/libempathy-gtk/empathy-account-widget-generic.c
@@ -32,9 +32,12 @@
#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mc-protocol.h>
-#include <libempathy-gtk/empathy-ui-utils.h>
+#include <libempathy/empathy-debug.h>
#include "empathy-account-widget-generic.h"
+#include "empathy-ui-utils.h"
+
+#define DEBUG_DOMAIN "AccountWidgetGeneric"
typedef struct {
McAccount *account;
@@ -178,10 +181,30 @@ account_widget_generic_setup_foreach (McProtocolParam *param,
GTK_FILL | GTK_EXPAND, 0,
0, 0);
}
- else if (param->signature[0] == 'q' ||
- param->signature[0] == 'n') {
- gchar *str = NULL;
- gint value = 0;
+ /* int types: ynqiuxt. double type is 'd' */
+ else if (param->signature[0] == 'y' ||
+ param->signature[0] == 'n' ||
+ param->signature[0] == 'q' ||
+ param->signature[0] == 'i' ||
+ param->signature[0] == 'u' ||
+ param->signature[0] == 'x' ||
+ param->signature[0] == 't' ||
+ param->signature[0] == 'd') {
+ gchar *str = NULL;
+ gint value = 0;
+ gdouble minint = 0;
+ gdouble maxint = 0;
+ gdouble step = 1;
+ switch (param->signature[0]) {
+ case 'y': minint = G_MININT8; maxint = G_MAXINT8; break;
+ case 'n': minint = G_MININT16; maxint = G_MAXINT16; break;
+ case 'q': minint = 0; maxint = G_MAXUINT16; break;
+ case 'i': minint = G_MININT32; maxint = G_MAXINT32; break;
+ case 'u': minint = 0; maxint = G_MAXUINT32; break;
+ case 'x': minint = G_MININT64; maxint = G_MAXINT64; break;
+ case 't': minint = 0; maxint = G_MAXUINT64; break;
+ case 'd': minint = G_MININT32; maxint = G_MAXINT32; step = 0.1; break;
+ }
str = g_strdup_printf (_("%s:"), param_name_formatted);
widget = gtk_label_new (str);
@@ -195,7 +218,7 @@ account_widget_generic_setup_foreach (McProtocolParam *param,
GTK_FILL, 0,
0, 0);
- widget = gtk_spin_button_new_with_range (0, G_MAXINT, 1);
+ widget = gtk_spin_button_new_with_range (minint, maxint, step);
mc_account_get_param_int (settings->account,
param->name,
&value);
@@ -233,6 +256,9 @@ account_widget_generic_setup_foreach (McProtocolParam *param,
GTK_FILL | GTK_EXPAND, 0,
0, 0);
} else {
+ empathy_debug (DEBUG_DOMAIN,
+ "Unknown signature for param %s: %s\n",
+ param_name_formatted, param->signature);
g_assert_not_reached ();
}