soylent r111 - trunk/src
- From: treitter svn gnome org
- To: svn-commits-list gnome org
- Subject: soylent r111 - trunk/src
- Date: Tue, 1 Apr 2008 06:40:11 +0100 (BST)
Author: treitter
Date: Tue Apr 1 06:40:10 2008
New Revision: 111
URL: http://svn.gnome.org/viewvc/soylent?rev=111&view=rev
Log:
Prefer variable name 'widget_name' to 'widget_str'
Modified:
trunk/src/soylent-browser-person-view.c
trunk/src/soylent-browser.c
Modified: trunk/src/soylent-browser-person-view.c
==============================================================================
--- trunk/src/soylent-browser-person-view.c (original)
+++ trunk/src/soylent-browser-person-view.c Tue Apr 1 06:40:10 2008
@@ -2329,7 +2329,7 @@
EContact *e_contact = NULL;
GtkEntry *entry_email = NULL;
GtkHBox *hbox_email = NULL;
- gchar *widget_str = NULL;
+ gchar *widget_name = NULL;
gchar *email_str = NULL;
guint email_list_pos = 0;
GList *l = NULL;
@@ -2362,15 +2362,15 @@
l && email_list_pos < MAX_GUI_EMAIL;
l = g_list_next (l), email_list_pos++)
{
- widget_str = g_strdup_printf ("entry_person_email_%c",
+ widget_name = g_strdup_printf ("entry_person_email_%c",
'1' + email_list_pos);
- entry_email = GTK_ENTRY (glade_xml_get_widget (wtree, widget_str));
- g_free (widget_str);
+ entry_email = GTK_ENTRY (glade_xml_get_widget (wtree, widget_name));
+ g_free (widget_name);
- widget_str = g_strdup_printf ("hbox_person_email_%c",
+ widget_name = g_strdup_printf ("hbox_person_email_%c",
'1' + email_list_pos);
- hbox_email = GTK_HBOX (glade_xml_get_widget (wtree, widget_str));
- g_free (widget_str);
+ hbox_email = GTK_HBOX (glade_xml_get_widget (wtree, widget_name));
+ g_free (widget_name);
email_str = (gchar*) l->data;
if (email_str)
@@ -2402,10 +2402,10 @@
* GtkEntrys */
for (; email_list_pos < MAX_GUI_EMAIL; email_list_pos++)
{
- widget_str = g_strdup_printf ("hbox_person_email_%c",
+ widget_name = g_strdup_printf ("hbox_person_email_%c",
'1' + email_list_pos);
- hbox_email = GTK_HBOX (glade_xml_get_widget (wtree, widget_str));
- g_free (widget_str);
+ hbox_email = GTK_HBOX (glade_xml_get_widget (wtree, widget_name));
+ g_free (widget_name);
gtk_widget_hide (GTK_WIDGET (hbox_email));
}
@@ -2492,28 +2492,28 @@
GtkHBox *hbox_im = NULL;
GtkLabel *label_im = NULL;
GtkEntry *entry_im = NULL;
- gchar *widget_str = NULL;
+ gchar *widget_name = NULL;
- widget_str = g_strdup_printf ("hbox_person_im_%s_%c",
+ widget_name = g_strdup_printf ("hbox_person_im_%s_%c",
CONTEXT_STRS[context],
'1' + entry_pos[context]);
hbox_im = GTK_HBOX (glade_xml_get_widget (wtree,
- widget_str));
- g_free (widget_str);
+ widget_name));
+ g_free (widget_name);
- widget_str = g_strdup_printf ("entry_person_im_%s_%c",
+ widget_name = g_strdup_printf ("entry_person_im_%s_%c",
CONTEXT_STRS[context],
'1' + entry_pos[context]);
entry_im = GTK_ENTRY (glade_xml_get_widget (wtree,
- widget_str));
- g_free (widget_str);
+ widget_name));
+ g_free (widget_name);
- widget_str = g_strdup_printf ("label_person_im_%s_%c",
+ widget_name = g_strdup_printf ("label_person_im_%s_%c",
CONTEXT_STRS[context],
'1' + entry_pos[context]);
label_im = GTK_LABEL (glade_xml_get_widget (wtree,
- widget_str));
- g_free (widget_str);
+ widget_name));
+ g_free (widget_name);
if (im_name)
{
@@ -2555,12 +2555,12 @@
for (i = 0; i < CONTEXT_NUM; i++)
{
GtkFrame *frame_im_cur = NULL;
- gchar *widget_str = NULL;
+ gchar *widget_name = NULL;
- widget_str = g_strdup_printf ("frame_person_im_%s",
+ widget_name = g_strdup_printf ("frame_person_im_%s",
CONTEXT_STRS[i]);
frame_im_cur = GTK_FRAME (glade_xml_get_widget (wtree,
- widget_str));
+ widget_name));
if (entry_pos[i] == ENTRY_POS_INIT)
{
@@ -2572,7 +2572,7 @@
gtk_widget_show (GTK_WIDGET (frame_im_cur));
}
- g_free (widget_str);
+ g_free (widget_name);
}
if (frames_visible > 0)
@@ -2591,16 +2591,16 @@
{
for (; entry_pos[context] < IM_FIELDS_PER_CONTEXT; entry_pos[context]++)
{
- gchar *widget_str = NULL;
+ gchar *widget_name = NULL;
GtkHBox *hbox_im = NULL;
- widget_str = g_strdup_printf ("hbox_person_im_%s_%c",
+ widget_name = g_strdup_printf ("hbox_person_im_%s_%c",
CONTEXT_STRS[context],
'1' + entry_pos[context]);
- hbox_im = GTK_HBOX (glade_xml_get_widget (wtree, widget_str));
+ hbox_im = GTK_HBOX (glade_xml_get_widget (wtree, widget_name));
gtk_widget_hide (GTK_WIDGET (hbox_im));
- g_free (widget_str);
+ g_free (widget_name);
}
}
@@ -2713,7 +2713,7 @@
GtkEntry *entry_region = NULL;
GtkEntry *entry_country = NULL;
GtkFrame *frame_mail_cur = NULL;
- gchar *widget_str = NULL;
+ gchar *widget_name = NULL;
const gchar *context_str = NULL;
EContactAddress *addr = NULL;
@@ -2724,11 +2724,11 @@
context_str,
NULL));
- widget_str = g_strdup_printf ("tv_person_mail_%s_street",
+ widget_name = g_strdup_printf ("tv_person_mail_%s_street",
CONTEXT_STRS[context]);
- tv_street = GTK_TEXT_VIEW (glade_xml_get_widget (wtree, widget_str));
+ tv_street = GTK_TEXT_VIEW (glade_xml_get_widget (wtree, widget_name));
tb_street = gtk_text_view_get_buffer (tv_street);
- g_free (widget_str);
+ g_free (widget_name);
entry_po = GTK_ENTRY (soylent_browser_get_widget (browser, "entry",
"mail", context_str,
@@ -2863,7 +2863,7 @@
/* FIXME: Find a way to use the CONTEXT_STRS instea of re-inventing it
* Maybe make CONTEXT_MOBILE equal to CONTEXT_OTHER. Or make it the 4th
* position in CONTEXT_STRS and have this loop skip over CONTEXT_OTHER */
- gchar *widget_str = NULL;
+ gchar *widget_name = NULL;
guint context = 0;
guint num_entries_set = 0;
const gchar *phone_str = NULL;
@@ -2884,16 +2884,16 @@
for (context = CONTEXT_POS_WORK; context < NUM_CONTEXT; context++)
{
- widget_str = g_strdup_printf ("entry_person_phone_%s",
+ widget_name = g_strdup_printf ("entry_person_phone_%s",
context_list[context]);
- entry_phone = GTK_ENTRY (glade_xml_get_widget (wtree, widget_str));
- g_free (widget_str);
+ entry_phone = GTK_ENTRY (glade_xml_get_widget (wtree, widget_name));
+ g_free (widget_name);
- widget_str = g_strdup_printf ("hbox_person_phone_%s",
+ widget_name = g_strdup_printf ("hbox_person_phone_%s",
context_list[context]);
- hbox_phone = GTK_HBOX (glade_xml_get_widget (wtree, widget_str));
- g_free (widget_str);
+ hbox_phone = GTK_HBOX (glade_xml_get_widget (wtree, widget_name));
+ g_free (widget_name);
phone_str = e_contact_get_const (e_contact, e_contact_fields[context]);
if (phone_str)
@@ -2949,7 +2949,7 @@
GtkEntry *entry_web = NULL;
GtkHBox *hbox_web = NULL;
GtkFrame *frame_web = NULL;
- gchar *widget_str = NULL;
+ gchar *widget_name = NULL;
guint type = 0;
guint num_entries_set = 0;
const gchar *web_name = NULL;
@@ -2970,14 +2970,14 @@
for (type = 0; type < NUM_TYPE; type++)
{
- widget_str = g_strdup_printf ("entry_person_web_%s", type_list[type]);
+ widget_name = g_strdup_printf ("entry_person_web_%s", type_list[type]);
- entry_web = GTK_ENTRY (glade_xml_get_widget (wtree, widget_str));
- g_free (widget_str);
+ entry_web = GTK_ENTRY (glade_xml_get_widget (wtree, widget_name));
+ g_free (widget_name);
- widget_str = g_strdup_printf ("hbox_person_web_%s", type_list[type]);
- hbox_web = GTK_HBOX (glade_xml_get_widget (wtree, widget_str));
- g_free (widget_str);
+ widget_name = g_strdup_printf ("hbox_person_web_%s", type_list[type]);
+ hbox_web = GTK_HBOX (glade_xml_get_widget (wtree, widget_name));
+ g_free (widget_name);
web_name = e_contact_get_const (e_contact, e_contact_fields[type]);
Modified: trunk/src/soylent-browser.c
==============================================================================
--- trunk/src/soylent-browser.c (original)
+++ trunk/src/soylent-browser.c Tue Apr 1 06:40:10 2008
@@ -347,7 +347,7 @@
{
GtkWidget *retval = NULL;
GladeXML *wtree = NULL;
- gchar *widget_str = NULL;
+ gchar *widget_name = NULL;
g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
@@ -361,20 +361,20 @@
if (subcontext)
{
- widget_str = g_strdup_printf ("%s_person_%s_%s_%s", type_widget,
+ widget_name = g_strdup_printf ("%s_person_%s_%s_%s", type_widget,
type_data, context, subcontext);
}
else
{
- widget_str = g_strdup_printf ("%s_person_%s_%s", type_widget,
+ widget_name = g_strdup_printf ("%s_person_%s_%s", type_widget,
type_data, context);
}
- if (widget_str)
+ if (widget_name)
{
- retval = glade_xml_get_widget (wtree, widget_str);
+ retval = glade_xml_get_widget (wtree, widget_name);
- g_free (widget_str);
+ g_free (widget_name);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]