Yattm - unified GTK instant-messaging client | |
[Generated for version 0.2-17 - Mon Jan 6 19:01:23 GMT+1 2003] |
#include <gtk/gtk.h>
Include dependency graph for add_contact_window.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Functions | |
void | show_add_contact_window () |
void | show_add_contact_to_group_window (grouplist *g) |
void | show_add_group_window () |
void | show_add_account_to_contact_window (struct contact *cont) |
void | edit_contact_window_new (struct contact *c) |
void | edit_account_window_new (eb_account *ea) |
void | add_unknown_account_window_new (eb_account *ea) |
void | edit_group_window_new (grouplist *g) |
GList * | get_all_accounts (int service) |
GList * | get_groups () |
|
Definition at line 313 of file edit_account_window.c. References _, and draw_edit_account_window(). Referenced by add_unknown_callback(), and edit_account_window_new().
00314 { 00315 draw_edit_account_window(ea, _("Add %s to Contact List"), _("Add Unknown Contact"), _("Add")); 00316 } |
|
Definition at line 318 of file edit_account_window.c. References _, account::account_contact, add_unknown_account_window_new(), draw_edit_account_window(), contact::group, and _grouplist::name. Referenced by edit_account_callback().
00319 { 00320 if(!strcmp(ea->account_contact->group->name, _("Unknown"))) 00321 add_unknown_account_window_new(ea); 00322 else 00323 draw_edit_account_window(ea, _("Edit %s"), _("Edit Account"), _("Save")); 00324 } |
|
Definition at line 69 of file edit_contact_window.c. References _, contact::default_chatb, destroy(), eb_icon(), edit_contact_window, get_groups(), get_service_list(), contact::group, group_list, _grouplist::name, nick, contact::nick, ok_callback(), service_list, and window_open. Referenced by edit_contact_callback().
00070 { 00071 gchar buff[1024]; 00072 if( !window_open ) 00073 { 00074 GtkWidget * vbox = gtk_vbox_new( FALSE, 5 ); 00075 GtkWidget * hbox = gtk_hbox_new( FALSE, 0 ); 00076 GtkWidget * hbox2; 00077 GtkWidget * button; 00078 GtkWidget * label; 00079 GtkWidget * iconwid; 00080 GtkWidget * frame; 00081 GtkWidget * table; 00082 GtkWidget * separator; 00083 GdkPixmap *icon; 00084 GdkBitmap *mask; 00085 GList * list; 00086 edit_contact_window = gtk_window_new(GTK_WINDOW_DIALOG); 00087 gtk_widget_realize(edit_contact_window); 00088 gtk_container_set_border_width(GTK_CONTAINER(edit_contact_window), 5); 00089 00090 table = gtk_table_new(2, 4, FALSE); 00091 gtk_table_set_row_spacings(GTK_TABLE(table), 5); 00092 gtk_table_set_row_spacings(GTK_TABLE(table), 5); 00093 gtk_container_set_border_width(GTK_CONTAINER(table), 5); 00094 00095 label = gtk_label_new(_("Contact Name:")); 00096 gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 5); 00097 gtk_widget_show(label); 00098 gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 0, 1, GTK_EXPAND, 00099 GTK_EXPAND, 0, 0); 00100 gtk_widget_show(hbox); 00101 00102 nick = gtk_entry_new(); 00103 gtk_table_attach(GTK_TABLE(table), nick, 1, 2, 0, 1, 00104 GTK_FILL, GTK_FILL, 0, 0); 00105 00106 gtk_entry_set_text(GTK_ENTRY(nick), c->nick ); 00107 gtk_widget_show(nick); 00108 00109 hbox = gtk_hbox_new(FALSE, 0); 00110 label = gtk_label_new(_("Default Protocol:")); 00111 gtk_box_pack_end(GTK_BOX(hbox),label, FALSE, FALSE, 5); 00112 gtk_widget_show(label); 00113 gtk_table_attach(GTK_TABLE(table), hbox, 2, 3, 0, 1, GTK_EXPAND, GTK_EXPAND, 00114 0, 0); 00115 gtk_widget_show(hbox); 00116 00117 00118 service_list = gtk_combo_new(); 00119 list = get_service_list(); 00120 gtk_combo_set_popdown_strings(GTK_COMBO(service_list), list ); 00121 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(service_list)->entry), 00122 eb_services[c->default_chatb].name); 00123 g_list_free(list); 00124 gtk_table_attach(GTK_TABLE(table), service_list, 3, 4, 0, 1, 00125 GTK_EXPAND, GTK_EXPAND, 0, 0); 00126 gtk_widget_show(service_list); 00127 00128 hbox = gtk_hbox_new( FALSE, 0 ); 00129 00130 label = gtk_label_new(_("Group Name:")); 00131 gtk_box_pack_end(GTK_BOX(hbox),label, FALSE, FALSE, 5); 00132 gtk_widget_show(label); 00133 00134 gtk_table_attach(GTK_TABLE(table), hbox, 0, 1, 1, 2, 00135 GTK_EXPAND, GTK_EXPAND, 0, 0); 00136 gtk_widget_show(hbox); 00137 00138 group_list = gtk_combo_new(); 00139 list = get_groups(); 00140 gtk_combo_set_popdown_strings(GTK_COMBO(group_list), list ); 00141 g_list_free(list); 00142 gtk_table_attach(GTK_TABLE(table), group_list, 1, 2, 1, 2, 00143 GTK_EXPAND, GTK_EXPAND, 0, 0); 00144 00145 gtk_widget_show(group_list); 00146 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(group_list)->entry), 00147 c->group->name); 00148 00149 frame = gtk_frame_new(NULL); 00150 00151 g_snprintf(buff,1024,_("Edit Properties for %s"), c->nick); 00152 gtk_frame_set_label(GTK_FRAME(frame), buff); 00153 00154 gtk_container_add(GTK_CONTAINER(frame), table); 00155 gtk_widget_show(table); 00156 00157 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); 00158 gtk_widget_show(frame); 00159 00160 separator = gtk_hseparator_new(); 00161 gtk_box_pack_start(GTK_BOX(vbox), separator, FALSE, FALSE, 5); 00162 gtk_widget_show(separator); 00163 00164 hbox = gtk_hbox_new(FALSE, 5); 00165 hbox2 = gtk_hbox_new(TRUE, 5); 00166 gtk_widget_set_usize(hbox2, 200,25 ); 00167 00168 /*Ok Button*/ 00169 00170 icon = gdk_pixmap_create_from_xpm_d( edit_contact_window->window, &mask, NULL, tb_edit_xpm); 00171 iconwid = gtk_pixmap_new( icon, mask ); 00172 label = gtk_label_new(_("Apply")); 00173 00174 gtk_box_pack_start(GTK_BOX(hbox), iconwid, FALSE, FALSE, 2); 00175 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); 00176 00177 gtk_widget_show(iconwid); 00178 gtk_widget_show(label); 00179 00180 button = gtk_button_new(); 00181 00182 gtk_signal_connect(GTK_OBJECT(button), "clicked", 00183 GTK_SIGNAL_FUNC(ok_callback), NULL ); 00184 00185 gtk_container_add (GTK_CONTAINER (button), hbox); 00186 gtk_widget_show(hbox); 00187 00188 gtk_box_pack_start(GTK_BOX(hbox2), button, TRUE, TRUE, 0); 00189 gtk_widget_show(button); 00190 00191 /*Cancel Button*/ 00192 00193 hbox = gtk_hbox_new(FALSE, 5); 00194 icon = gdk_pixmap_create_from_xpm_d( edit_contact_window->window, &mask, NULL, cancel_xpm); 00195 iconwid = gtk_pixmap_new( icon, mask ); 00196 label = gtk_label_new(_("Cancel")); 00197 00198 gtk_box_pack_start(GTK_BOX(hbox), iconwid, FALSE, FALSE, 2); 00199 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); 00200 00201 gtk_widget_show(iconwid); 00202 gtk_widget_show(label); 00203 00204 button = gtk_button_new(); 00205 00206 gtk_signal_connect_object(GTK_OBJECT(button), "clicked", 00207 GTK_SIGNAL_FUNC(gtk_widget_destroy), 00208 GTK_OBJECT(edit_contact_window)); 00209 gtk_container_add (GTK_CONTAINER (button), hbox); 00210 gtk_widget_show(hbox); 00211 00212 gtk_box_pack_start(GTK_BOX(hbox2), button, TRUE, TRUE, 0); 00213 gtk_widget_show(button); 00214 00215 /*Buttons End*/ 00216 00217 hbox = gtk_hbox_new(FALSE, 5); 00218 00219 gtk_box_pack_end(GTK_BOX(hbox), hbox2, FALSE, FALSE, 0 ); 00220 gtk_widget_show(hbox2); 00221 00222 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); 00223 gtk_widget_show(hbox); 00224 00225 table = gtk_table_new(1, 1, FALSE); 00226 gtk_table_attach(GTK_TABLE(table), vbox, 0, 1, 0, 1, 00227 GTK_EXPAND, GTK_EXPAND, 0, 0); 00228 gtk_widget_show(vbox); 00229 00230 gtk_container_add(GTK_CONTAINER(edit_contact_window), table); 00231 gtk_widget_show(table); 00232 00233 gtk_signal_connect( GTK_OBJECT(edit_contact_window), "destroy", 00234 GTK_SIGNAL_FUNC(destroy), NULL ); 00235 gtk_widget_show(edit_contact_window); 00236 } 00237 00238 //gtk_entry_set_text(GTK_ENTRY(nick), c->nick ); 00239 //gtk_combo_set_value_in_list(GTK_COMBO(service_list), c-> default_chatb, 0 ); 00240 g_snprintf(buff,1024,_("Edit Properties for %s"), c->nick); 00241 gtk_window_set_title(GTK_WINDOW(edit_contact_window), buff ); 00242 eb_icon(edit_contact_window->window); 00243 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(service_list)->entry), 00244 eb_services[c->default_chatb].name ); 00245 00246 gtk_signal_connect( GTK_OBJECT(edit_contact_window), "destroy", 00247 GTK_SIGNAL_FUNC(destroy), NULL ); 00248 my_contact = c; 00249 window_open = 1; 00250 } |
|
Definition at line 67 of file edit_group_window.c. References _, cancel_callback(), destroy(), eb_icon(), edit_group_window, group_name, _grouplist::name, ok_callback(), and window_open. Referenced by edit_group_callback(), and show_add_group_window().
00068 { 00069 gchar buff[1024]; 00070 gchar *name; 00071 if (g) 00072 name = g->name; 00073 else 00074 name = ""; 00075 if ( !window_open ) 00076 { 00077 GtkWidget * vbox = gtk_vbox_new( FALSE, 5 ); 00078 GtkWidget * hbox = gtk_hbox_new( FALSE, 5 ); 00079 GtkWidget * label; 00080 00081 edit_group_window = gtk_window_new(GTK_WINDOW_DIALOG); 00082 gtk_window_set_position(GTK_WINDOW(edit_group_window), GTK_WIN_POS_MOUSE); 00083 gtk_widget_realize(edit_group_window); 00084 00085 label = gtk_label_new(_("Group Name")); 00086 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); 00087 gtk_widget_show(label); 00088 00089 group_name = gtk_entry_new(); 00090 gtk_box_pack_start(GTK_BOX(hbox), group_name, TRUE, TRUE, 5); 00091 gtk_entry_set_text(GTK_ENTRY(group_name), name); 00092 gtk_widget_show(group_name); 00093 00094 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); 00095 gtk_widget_show(hbox); 00096 00097 hbox = gtk_hbox_new(TRUE, 5); 00098 00099 label = gtk_button_new_with_label(_("OK")); 00100 gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 5); 00101 gtk_signal_connect(GTK_OBJECT(label), "clicked", 00102 GTK_SIGNAL_FUNC(ok_callback), NULL); 00103 gtk_widget_show(label); 00104 00105 label = gtk_button_new_with_label(_("Cancel")); 00106 gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 5); 00107 gtk_signal_connect(GTK_OBJECT(label), "clicked", 00108 GTK_SIGNAL_FUNC(cancel_callback), NULL); 00109 00110 gtk_widget_show(label); 00111 00112 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); 00113 gtk_widget_show(hbox); 00114 00115 gtk_container_add(GTK_CONTAINER(edit_group_window), vbox); 00116 gtk_widget_show(vbox); 00117 00118 gtk_signal_connect( GTK_OBJECT(edit_group_window), "destroy", 00119 GTK_SIGNAL_FUNC(destroy), NULL); 00120 gtk_widget_show(edit_group_window); 00121 } 00122 00123 gtk_entry_set_text(GTK_ENTRY(group_name), name); 00124 if (g) 00125 g_snprintf(buff, 1024, _("Edit Properties for %s"), name); 00126 else 00127 g_snprintf(buff, 1024, _("Add group")); 00128 gtk_window_set_title(GTK_WINDOW(edit_group_window), buff); 00129 eb_icon(edit_group_window->window); 00130 gtk_signal_connect(GTK_OBJECT(edit_group_window), "destroy", 00131 GTK_SIGNAL_FUNC(destroy), NULL); 00132 00133 current_group = g; 00134 window_open = 1; 00135 } |
|
Definition at line 163 of file add_contact_window.c. References get_all_contacts(), get_eb_accounts(), account::handle, and account::service_id.
00164 { 00165 GList *node = get_all_contacts(); 00166 GList *newlist = NULL; 00167 00168 while(node) { 00169 GList * g = get_eb_accounts(((struct contact*)node->data)->nick); 00170 while (g) { 00171 eb_account *ac = (eb_account *)g->data; 00172 if (ac->service_id == serviceid) 00173 newlist = g_list_append(newlist, ac->handle); 00174 g = g->next; 00175 } 00176 node = node->next; 00177 } 00178 00179 return newlist; 00180 } |
|
Definition at line 85 of file edit_account_window.c. Referenced by draw_edit_account_window(), edit_contact_window_new(), get_all_contacts(), and show_add_defined_contact_window().
00086 { 00087 GList * node = NULL; 00088 GList * newlist = NULL; 00089 node = groups; 00090 00091 while(node) 00092 { 00093 newlist = g_list_append(newlist, ((grouplist *)node->data)->name); 00094 node = node->next; 00095 } 00096 00097 return newlist; 00098 } |
|
Definition at line 500 of file add_contact_window.c. References show_add_defined_contact_window(). Referenced by add_account_to_contact_callback().
00501 { 00502 show_add_defined_contact_window(cont, NULL); 00503 } |
|
Definition at line 490 of file add_contact_window.c. References show_add_defined_contact_window(). Referenced by add_to_group_callback().
00491 { 00492 show_add_defined_contact_window(NULL, g); 00493 } |
|
Definition at line 485 of file add_contact_window.c. References show_add_defined_contact_window(). Referenced by add_callback().
00486 { 00487 show_add_defined_contact_window(NULL, NULL); 00488 } |
|
Definition at line 495 of file add_contact_window.c. References edit_group_window_new(). Referenced by add_group_callback().
00496 { 00497 edit_group_window_new(NULL); 00498 } |