Yattm - unified GTK instant-messaging client logo
   [Generated for version 0.2-17 - Mon Jan 6 19:01:23 GMT+1 2003]

Home - Main Page - Data Structures - File List - Data Fields - Globals

dialog.h File Reference

#include <gtk/gtk.h>

Include dependency graph for dialog.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  _list_dialog_data
struct  _text_input_window

Typedefs

typedef _list_dialog_data list_dialog_data
typedef _text_input_window text_input_window

Functions

GtkWidget * eb_push_button (const char *text, GtkWidget *page)
GtkWidget * eb_button (const char *text, int *value, GtkWidget *page)
GSList * eb_radio (GSList *group, const char *text, int curr_val, int set_val, GtkWidget *page, void *set_element)
GtkWidget * eb_menu_button (GtkMenu *menu, gchar *label, GtkSignalFunc callback_func, gpointer callback_arg)
GtkWidget * eb_menu_submenu (GtkMenu *menu, gchar *label, GtkWidget *submenu)
GtkWidget * do_error_dialog (char *message, char *title)
void eb_icon (GdkWindow *)
void do_dialog (gchar *message, gchar *title, void(*action)(GtkWidget *widget, gpointer data), gpointer data)
void do_list_dialog (gchar *message, gchar *title, char **list, void(*action)(char *text, gpointer data), gpointer data)
void do_text_input_window (gchar *title, gchar *value, void(*action)(char *text, gpointer data), gpointer data)
void eb_new_user ()


Typedef Documentation

typedef struct _list_dialog_data list_dialog_data
 

typedef struct _text_input_window text_input_window
 


Function Documentation

void do_dialog gchar *    message,
gchar *    title,
void(*    action)(GtkWidget *widget, gpointer data),
gpointer    data
 

Definition at line 260 of file dialog.c.

References _, and title.

Referenced by eb_do_dialog(), get_file(), ignore_callback(), invite_dialog(), offer_remove_account_callback(), offer_remove_contact_callback(), and offer_remove_group_callback().

00261 {
00262     GtkWidget * dialog_window;
00263     GtkWidget * button;
00264     GtkWidget * label;
00265     GdkPixmap *pm;
00266     GdkBitmap *bm;
00267     GtkWidget * button_box;
00268 
00269     dialog_window = gtk_dialog_new();
00270     gtk_window_set_position(GTK_WINDOW(dialog_window), GTK_WIN_POS_MOUSE);
00271     gtk_widget_realize(dialog_window);
00272     gtk_window_set_title(GTK_WINDOW(dialog_window), title );
00273 
00274 
00275 
00276     label = gtk_label_new(message);
00277     gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
00278     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_window)->vbox),
00279         label, FALSE, FALSE, 5);
00280 
00281     button_box = gtk_hbox_new(FALSE, 5);
00282     pm = gdk_pixmap_create_from_xpm_d(statuswindow->window, &bm, NULL, tb_yes_xpm);
00283     label = gtk_pixmap_new(pm, bm);
00284 
00285     gtk_box_pack_start(GTK_BOX(button_box), label, FALSE, FALSE, 2 );
00286 
00287     label = gtk_label_new(_("Yes"));
00288     gtk_box_pack_start(GTK_BOX(button_box), label, FALSE, FALSE, 2 );
00289 
00290 
00291     button = gtk_button_new();
00292     gtk_container_add(GTK_CONTAINER(button), button_box);
00293     gtk_widget_show(button_box);
00294     gtk_signal_connect(GTK_OBJECT(button), "clicked",
00295                        GTK_SIGNAL_FUNC(action), data );
00296     gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
00297                               GTK_SIGNAL_FUNC(gtk_widget_destroy),
00298                               (gpointer)dialog_window);
00299     gtk_object_set_user_data(GTK_OBJECT(button), (gpointer)1);
00300     
00301     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_window)->action_area), 
00302                         button, FALSE, FALSE, 5 );
00303 
00304     button_box = gtk_hbox_new(FALSE, 5);
00305     pm = gdk_pixmap_create_from_xpm_d(statuswindow->window, &bm, NULL, tb_no_xpm);
00306     label = gtk_pixmap_new(pm, bm);
00307 
00308     gtk_box_pack_start(GTK_BOX(button_box), label, FALSE, FALSE, 2 );
00309 
00310     label = gtk_label_new(_("No"));
00311     gtk_box_pack_start(GTK_BOX(button_box), label, FALSE, FALSE, 2 );
00312 
00313 
00314     button = gtk_button_new();
00315     gtk_container_add(GTK_CONTAINER(button), button_box);
00316 
00317     gtk_signal_connect(GTK_OBJECT(button), "clicked",
00318                        GTK_SIGNAL_FUNC(action), data);
00319     gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
00320                               GTK_SIGNAL_FUNC(gtk_widget_destroy),
00321                               (gpointer)dialog_window);
00322     gtk_object_set_user_data(GTK_OBJECT(button), (gpointer)0 );
00323 
00324     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_window)->action_area), 
00325                         button, FALSE, FALSE, 5 );
00326 
00327     gtk_widget_show_all(dialog_window);
00328 }

GtkWidget* do_error_dialog char *    message,
char *    title
 

Definition at line 338 of file dialog.c.

References _, and title.

Referenced by add_account_verbose(), add_button_callback(), add_callback(), file_ok(), get_file2(), load_modules(), load_utility_plugin(), main(), ok_callback(), reload_service_accounts(), send_file(), unload_module(), and update_send_progress().

00339 {
00340     GtkWidget *d;
00341     GtkWidget *label;
00342     GtkWidget *close;
00343 
00344 
00345     d = gtk_dialog_new();
00346     /* if parent is not main window, set it.
00347      * This prevents this dialog from popping up 'underneath' another
00348      * dialog to which it applies
00349      */
00350     /*if(current_parent_widget)
00351     {
00352     gtk_window_set_transient_for(GTK_WINDOW(d),
00353                      GTK_WINDOW(current_parent_widget));
00354     }*/
00355     label = gtk_label_new(message);
00356     gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
00357     gtk_widget_show(label);
00358     close = gtk_button_new_with_label(_("OK"));
00359     gtk_widget_show(close);
00360     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->vbox),
00361         label, FALSE, FALSE, 5);
00362     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->action_area),
00363         close, FALSE, FALSE, 5);
00364     /* so text isn't up against the border */
00365     gtk_container_set_border_width(GTK_CONTAINER(d), 5);
00366     gtk_widget_realize(d);
00367     gtk_window_set_title(GTK_WINDOW(d), title);
00368     gtk_window_set_position(GTK_WINDOW(d), GTK_WIN_POS_MOUSE);
00369     gtk_signal_connect_object(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(d));
00370     gtk_window_set_modal(GTK_WINDOW(d), TRUE);
00371 
00372     gtk_widget_show(d);
00373     return d;
00374 }

void do_list_dialog gchar *    message,
gchar *    title,
char **    list,
void(*    action)(char *text, gpointer data),
gpointer    data
 

Definition at line 194 of file dialog.c.

References _list_dialog_data::callback, _list_dialog_data::data, DBG_CORE, eb_debug, list_dialog_callback(), and title.

00195 {
00196     GtkWidget * dialog_window;
00197     GtkWidget * label;
00198     GtkWidget * clist;
00199     /*  UNUSED GtkWidget * button_box; */
00200     char *Row[2]={NULL, NULL};
00201     list_dialog_data *ldata;
00202     char **ptr=list;
00203 
00204     eb_debug(DBG_CORE, ">Entering\n");
00205     if(list[0]==NULL) {
00206         eb_debug(DBG_CORE, ">Leaving as list[0]==NULL\n");
00207         return;
00208     }
00209     dialog_window = gtk_dialog_new();
00210 
00211     gtk_widget_realize(dialog_window);
00212     gtk_window_set_title(GTK_WINDOW(dialog_window), title );
00213 
00214     label = gtk_label_new(message);
00215     gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
00216     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_window)->vbox),
00217         label, FALSE, FALSE, 5);
00218 
00219     /* Convert the **list to a GList */
00220     clist = gtk_clist_new(1);   /* Only 1 column */
00221     gtk_clist_set_selection_mode(GTK_CLIST(clist), GTK_SELECTION_SINGLE);
00222     gtk_clist_set_column_width (GTK_CLIST(clist), 0, 200);
00223     /* Array of pointers to elements, one per column */
00224     while(*ptr) {
00225         Row[0]=*ptr;
00226         ptr++;
00227         gtk_clist_append(GTK_CLIST(clist), Row);
00228         free(Row[0]);
00229     }
00230     free(list);
00231 
00232     ldata=calloc(1, sizeof(list_dialog_data));
00233     ldata->callback=action;
00234     ldata->data=data;
00235     gtk_signal_connect(GTK_OBJECT(clist),
00236         "select_row",
00237         GTK_SIGNAL_FUNC(list_dialog_callback),
00238         ldata);
00239     gtk_signal_connect_object(GTK_OBJECT(clist),
00240         "select_row",
00241         GTK_SIGNAL_FUNC(gtk_widget_destroy),
00242         (gpointer)dialog_window);
00243     gtk_widget_show(clist);
00244     /* End list construction */
00245 /*
00246     button_box = gtk_hbox_new(FALSE, 5);
00247 
00248     gtk_box_pack_start(GTK_BOX(button_box), label, FALSE, FALSE, 2 );
00249 
00250     gtk_container_add(GTK_CONTAINER(button_box), button_box);
00251     gtk_widget_show(button_box);
00252 */  
00253     gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_window)->action_area), 
00254                         clist, FALSE, FALSE, 5 );
00255 
00256     gtk_widget_show_all(dialog_window);
00257     eb_debug(DBG_CORE, ">Leaving, all done\n");
00258 }

void do_text_input_window gchar *    title,
gchar *    value,
void(*    action)(char *text, gpointer data),
gpointer    data
 

Definition at line 393 of file dialog.c.

References _, _text_input_window::callback, _text_input_window::data, eb_icon(), input_window_destroy(), input_window_ok(), _text_input_window::text, title, and _text_input_window::window.

00396 {
00397     GtkWidget * vbox = gtk_vbox_new(FALSE, 5);
00398     GtkWidget * frame = gtk_frame_new(NULL); 
00399     GtkWidget * hbox;
00400     GtkWidget * hbox2;
00401     GtkWidget * separator;
00402     GtkWidget * iconwid;
00403     GdkPixmap * icon;
00404     GdkBitmap * mask;
00405     GtkWidget * label;
00406     GtkWidget * button;
00407 
00408     text_input_window * input_window = g_new0(text_input_window, 1);
00409     input_window->callback = action;
00410     input_window->data = data;
00411 
00412     input_window->window = gtk_window_new(GTK_WINDOW_DIALOG);
00413     gtk_window_set_position(GTK_WINDOW(input_window->window), GTK_WIN_POS_MOUSE);
00414         gtk_widget_realize(input_window->window);
00415 
00416     gtk_container_set_border_width(GTK_CONTAINER(input_window->window), 5);
00417     gtk_frame_set_label(GTK_FRAME(frame), title);
00418 
00419     input_window->text = gtk_text_new(NULL, NULL);
00420     gtk_widget_set_usize(input_window->text, 400, 200);
00421     gtk_text_insert(GTK_TEXT(input_window->text),
00422             NULL, NULL, NULL, value, strlen(value));
00423     gtk_text_set_editable(GTK_TEXT(input_window->text),
00424             TRUE);
00425 
00426     gtk_container_add(GTK_CONTAINER(frame), input_window->text);
00427     gtk_widget_show(input_window->text);
00428 
00429     gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
00430     gtk_widget_show(frame);
00431 
00432 
00433     separator = gtk_hseparator_new();
00434     gtk_box_pack_start(GTK_BOX(vbox), separator, FALSE, FALSE, 5);
00435     gtk_widget_show(separator);
00436 
00437     hbox = gtk_hbox_new(FALSE, 5);
00438     hbox2 = gtk_hbox_new(TRUE, 5);
00439 
00440     gtk_widget_set_usize(hbox2, 100,25);
00441 
00442     icon = gdk_pixmap_create_from_xpm_d(input_window->window->window, &mask, NULL, ok_xpm);
00443     iconwid = gtk_pixmap_new(icon, mask);
00444     label = gtk_label_new(_("OK"));
00445          
00446     gtk_box_pack_start(GTK_BOX(hbox), iconwid, FALSE, FALSE, 2);
00447     gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2);
00448          
00449     gtk_widget_show(iconwid);
00450     gtk_widget_show(label);
00451          
00452     button = gtk_button_new();
00453          
00454     gtk_signal_connect(GTK_OBJECT(button), "clicked", input_window_ok,
00455             input_window);
00456 
00457     gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
00458                   GTK_SIGNAL_FUNC(gtk_widget_destroy),
00459                   GTK_OBJECT(input_window->window));
00460          
00461     gtk_container_add(GTK_CONTAINER (button), hbox);        
00462     gtk_widget_show(hbox);     
00463          
00464     gtk_box_pack_start(GTK_BOX(hbox2), button, TRUE, TRUE, 0);
00465     gtk_widget_show(button);
00466 
00467     hbox = gtk_hbox_new(FALSE, 0);
00468         
00469     gtk_box_pack_end(GTK_BOX(hbox),hbox2, FALSE, FALSE, 0);
00470     gtk_widget_show(hbox2);      
00471       
00472     gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
00473     gtk_widget_show(hbox);
00474 
00475     gtk_container_add(GTK_CONTAINER(input_window->window), vbox);
00476     gtk_widget_show(vbox);
00477 
00478         gtk_window_set_title(GTK_WINDOW(input_window->window), title);
00479     eb_icon(input_window->window->window);
00480 
00481     gtk_signal_connect(GTK_OBJECT(input_window->window), "destroy",
00482             GTK_SIGNAL_FUNC(input_window_destroy), input_window);
00483 
00484     gtk_widget_show(input_window->window);
00485         
00486 
00487 }

GtkWidget* eb_button const char *    text,
int *    value,
GtkWidget *    page
 

Definition at line 54 of file dialog.c.

References set_option().

Referenced by build_chat_prefs(), build_general_prefs(), build_layout_prefs(), build_logs_prefs(), build_proxy_prefs(), build_sound_tab(), and eb_input_render().

00055 {
00056     GtkWidget *button;
00057     button = gtk_check_button_new_with_label(text);
00058     gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), *value);
00059     gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0);
00060     gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_option), value);
00061     gtk_widget_show(button);
00062     return button;
00063 }

void eb_icon GdkWindow *   
 

Definition at line 157 of file dialog.c.

References icon_bm, and icon_pm.

Referenced by build_prefs(), do_text_input_window(), draw_edit_account_window(), eb_chat_window_new(), eb_info_window_new(), eb_join_chat_room(), eb_new_user(), eb_status_window(), edit_contact_window_new(), edit_group_window_new(), show_about(), show_add_defined_contact_window(), show_away(), show_away2(), and show_trigger_window().

00158 {
00159     GdkAtom icon_atom;
00160     glong data[2];
00161         if (icon_pm == NULL) {
00162                 icon_pm = gdk_pixmap_create_from_xpm_d(w, &icon_bm,
00163                           NULL, (gchar **)yattm_xpm);
00164         }
00165 
00166 #ifndef __MINGW32__
00167         data[0] = ((GdkPixmapPrivate *)icon_pm)->xwindow;
00168         data[1] = ((GdkPixmapPrivate *)icon_bm)->xwindow;
00169 
00170         icon_atom = gdk_atom_intern( "KWM_WIN_ICON", FALSE);
00171         gdk_property_change (w, icon_atom, icon_atom,
00172                 32, GDK_PROP_MODE_REPLACE,
00173                 (guchar *)data, 2);
00174 #endif
00175         gdk_window_set_icon(w, NULL, icon_pm, icon_bm);
00176 //      gdk_window_set_back_pixmap(w, icon_pm, 0 );
00177  //       gdk_window_set_group(w, statuswindow->window);
00178 }

GtkWidget* eb_menu_button GtkMenu *    menu,
gchar *    label,
GtkSignalFunc    callback_func,
gpointer    callback_arg
 

Definition at line 115 of file dialog.c.

Referenced by account_menu(), contact_menu(), and group_menu().

00118 {
00119   GtkWidget * button;
00120   if (label == NULL)
00121       button = gtk_menu_item_new();
00122   else
00123       button = gtk_menu_item_new_with_label(label);
00124   if(callback_func != NULL)
00125       gtk_signal_connect(GTK_OBJECT(button), "activate",
00126             callback_func, callback_arg);
00127   gtk_menu_append(menu, button);
00128   gtk_widget_show(button);
00129 
00130   return (button);
00131 }

GtkWidget* eb_menu_submenu GtkMenu *    menu,
gchar *    label,
GtkWidget *    submenu
 

Definition at line 133 of file dialog.c.

Referenced by contact_menu().

00135 {
00136   GtkWidget * button;
00137   
00138   button = gtk_menu_item_new_with_label(label);
00139   gtk_menu_append(GTK_MENU(menu), button);
00140 
00141   gtk_menu_item_set_submenu (GTK_MENU_ITEM (button), submenu);
00142   gtk_widget_show(button);
00143 
00144   return (button);
00145 }

void eb_new_user  
 

Definition at line 327 of file editcontacts.c.

References _, account_list, account_window, add_callback(), cancel_callback(), del_button, destroy(), eb_icon(), get_service_list(), is_open, mod_button, modify_callback(), ok_callback(), PASSWORD, password, read_contacts(), remove_callback(), selection_made(), selection_unmade(), service_type, and username.

Referenced by eb_edit_accounts(), and start_login().

00328 {
00329     char * text[] ={_("Screen Name"), 
00330             _("Password"), 
00331             _("Service Type")};
00332     GtkWidget * box;
00333     GtkWidget * window_box;
00334     GtkWidget * hbox;
00335     GtkWidget * button_box;
00336     GtkWidget * label;
00337     GtkWidget * iconwid;
00338     GtkWidget * toolbar;
00339     GtkWidget * toolitem;
00340     GtkWidget * separator;
00341     GList * list;
00342     GdkPixmap *icon;
00343     GdkBitmap *mask;
00344 
00345     if(is_open)
00346         return;
00347 
00348     is_open = 1;
00349 
00350     account_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
00351     gtk_window_set_position(GTK_WINDOW(account_window), GTK_WIN_POS_MOUSE);
00352     gtk_widget_realize(account_window);
00353     account_list = gtk_clist_new_with_titles(3,text); 
00354     gtk_clist_set_column_visibility(GTK_CLIST(account_list), PASSWORD, FALSE);
00355     gtk_container_set_border_width(GTK_CONTAINER(account_window), 5);
00356     gtk_signal_connect(GTK_OBJECT(account_list), "select_row",
00357                         GTK_SIGNAL_FUNC(selection_made),
00358                         NULL);
00359     gtk_signal_connect(GTK_OBJECT(account_list), "unselect_row",
00360                         GTK_SIGNAL_FUNC(selection_unmade), 
00361                         NULL);
00362     
00363     box = gtk_vbox_new(FALSE, 0);
00364     window_box = gtk_vbox_new(FALSE,5);
00365     hbox = gtk_hbox_new(FALSE, 5);
00366     gtk_container_set_border_width(GTK_CONTAINER(hbox), 5);
00367 
00368     /*Screen Name Section*/
00369    
00370     label = gtk_label_new(_("Screen Name:"));
00371     gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
00372     gtk_widget_show(label);
00373     username = gtk_entry_new();
00374     gtk_box_pack_start(GTK_BOX(box), username, FALSE, FALSE, 2);
00375     gtk_widget_show(username);
00376 
00377     /*Password Section*/
00378    
00379     label = gtk_label_new(_("Password:"));
00380     gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
00381     gtk_widget_show(label);
00382     password = gtk_entry_new();
00383     gtk_entry_set_visibility(GTK_ENTRY(password), FALSE);
00384     gtk_box_pack_start(GTK_BOX(box), password, FALSE, FALSE, 2);
00385     gtk_widget_show(password);
00386 
00387     /*Service Type Section*/
00388    
00389     label = gtk_label_new(_("Service Type:"));
00390     gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
00391     gtk_widget_show(label);
00392     service_type = gtk_combo_new();
00393     list = get_service_list();
00394     gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(service_type)->entry), FALSE);
00395     gtk_combo_set_popdown_strings(GTK_COMBO(service_type), list);
00396     g_list_free(list);
00397     gtk_widget_show(service_type);
00398     gtk_box_pack_start(GTK_BOX(box), service_type, FALSE, FALSE, 2);
00399     
00400     gtk_box_pack_start(GTK_BOX(hbox), box, FALSE, FALSE, 2);  
00401     gtk_widget_show(box);
00402     
00403     box = gtk_vbox_new(FALSE, 0);
00404 
00405     read_contacts();
00406 
00407     gtk_box_pack_start(GTK_BOX(box), account_list, TRUE, TRUE, 0);
00408     gtk_widget_show(account_list);
00409 
00410     gtk_box_pack_start(GTK_BOX(hbox), box, TRUE, TRUE, 2);
00411     gtk_widget_show(box);
00412 
00413     gtk_box_pack_start(GTK_BOX(window_box), hbox, TRUE, TRUE, 0);
00414     gtk_widget_show(hbox);
00415 
00416     separator = gtk_hseparator_new();
00417     gtk_box_pack_start(GTK_BOX(window_box), separator, TRUE, TRUE, 0);
00418     gtk_widget_show(separator);
00419 
00420     /*Initialize Toolbar*/
00421 
00422     toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
00423     gtk_toolbar_set_button_relief(GTK_TOOLBAR(toolbar), GTK_RELIEF_NONE);
00424     gtk_container_set_border_width(GTK_CONTAINER(toolbar), 0);
00425     gtk_toolbar_set_space_size(GTK_TOOLBAR(toolbar), 5);
00426    
00427     /*Add Button*/
00428    
00429     icon = gdk_pixmap_create_from_xpm_d(account_window->window, &mask, NULL, tb_preferences_xpm);
00430     iconwid = gtk_pixmap_new(icon, mask);
00431     gtk_widget_show(iconwid);
00432     toolitem = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar),
00433                         _("Add"),
00434                                         _("Add Account"),
00435                                         _("Add"),
00436                                         iconwid,
00437                                         GTK_SIGNAL_FUNC(add_callback),
00438                                         NULL);
00439     gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
00440     
00441     /*Delete Button*/
00442     
00443     icon = gdk_pixmap_create_from_xpm_d(account_window->window, &mask, NULL, tb_trash_xpm);
00444     iconwid = gtk_pixmap_new(icon, mask);
00445     gtk_widget_show(iconwid);
00446     del_button = gtk_toolbar_append_item (GTK_TOOLBAR(toolbar),
00447                         _("Delete"),
00448                                         _("Delete Account"),
00449                                         _("Delete"),
00450                                         iconwid,
00451                                         GTK_SIGNAL_FUNC(remove_callback),
00452                                         NULL);
00453     gtk_widget_set_sensitive(del_button, FALSE);
00454     gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
00455    
00456     /* Modify Button */
00457     
00458     icon = gdk_pixmap_create_from_xpm_d(account_window->window, &mask, NULL, tb_edit_xpm);
00459     iconwid = gtk_pixmap_new(icon, mask);
00460     gtk_widget_show(iconwid);
00461     mod_button = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar),
00462                             _("Modify"),
00463                                             _("Modify Account"),
00464                                             _("Modify"),
00465                                              iconwid,
00466                                              GTK_SIGNAL_FUNC(modify_callback),
00467                                              NULL);
00468     gtk_widget_set_sensitive(mod_button, FALSE);
00469     gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
00470 
00471     separator = gtk_vseparator_new();
00472     gtk_widget_set_usize(GTK_WIDGET(separator), 0, 20);
00473     gtk_toolbar_append_widget(GTK_TOOLBAR(toolbar), separator, NULL, NULL);
00474     gtk_widget_show(separator);
00475     gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
00476    
00477     /*Okay Button*/
00478     
00479     icon = gdk_pixmap_create_from_xpm_d(account_window->window, &mask, NULL, ok_xpm);
00480     iconwid = gtk_pixmap_new(icon, mask);
00481     gtk_widget_show(iconwid);
00482     toolitem = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar),
00483                         _("Ok"),
00484                                         _("Ok"),
00485                                         _("Ok"),
00486                                         iconwid,
00487                                         GTK_SIGNAL_FUNC(ok_callback),
00488                                         NULL);
00489     gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
00490 
00491     /*Cancel Button*/
00492     
00493     icon = gdk_pixmap_create_from_xpm_d(account_window->window, &mask, NULL, cancel_xpm);
00494     iconwid = gtk_pixmap_new(icon, mask);
00495     gtk_widget_show(iconwid);
00496     toolitem = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar),
00497                         _("Cancel"),
00498                                         _("Cancel"),
00499                                         _("Cancel"),
00500                                         iconwid,
00501                                         GTK_SIGNAL_FUNC(cancel_callback),
00502                                         NULL);
00503 
00504     /*Buttons End*/
00505    
00506     button_box = gtk_hbox_new(FALSE, 0);
00507    
00508     gtk_box_pack_end(GTK_BOX(button_box), toolbar, FALSE, FALSE, 0);
00509     gtk_widget_show(toolbar);
00510    
00511     gtk_box_pack_start(GTK_BOX(window_box), button_box, FALSE, FALSE, 0);
00512     gtk_widget_show(button_box);
00513    
00514     gtk_widget_show(window_box);
00515 
00516     gtk_container_add(GTK_CONTAINER(account_window), window_box);
00517    
00518     gtk_window_set_title(GTK_WINDOW(account_window), _("Yattm Account Editor"));
00519     eb_icon(account_window->window);
00520 
00521     gtk_signal_connect(GTK_OBJECT(account_window), "destroy",
00522                        GTK_SIGNAL_FUNC(destroy), NULL );
00523     gtk_widget_show(account_window);
00524 }

GtkWidget* eb_push_button const char *    text,
GtkWidget *    page
 

Definition at line 65 of file dialog.c.

Referenced by build_modules_prefs(), and plugin_selected().

00066 {
00067     GtkWidget *button;
00068     button = gtk_button_new_with_label(text);
00069     gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0);
00070     gtk_widget_show(button);
00071     return button;
00072 }

GSList* eb_radio GSList *    group,
const char *    text,
int    curr_val,
int    set_val,
GtkWidget *    page,
void *    set_element
 

Definition at line 78 of file dialog.c.

Referenced by build_layout_prefs().

00080 {
00081   GtkWidget * radio;
00082 
00083   /* Create Button w/ or w/out text, as requested */
00084   if (text == NULL)
00085     {
00086       radio = gtk_radio_button_new (group);
00087     }
00088   else
00089     {
00090       radio = gtk_radio_button_new_with_label (group, text);
00091     }
00092 
00093   /* select this button if it should be */
00094   gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON(radio),
00095                    (curr_val == set_val));
00096 
00097   /* add this button to whatever box given */
00098   gtk_box_pack_start (GTK_BOX(page), radio, FALSE, FALSE, 0);
00099 
00100   /* Set the callback that we're told to set and the argument */
00101   gtk_signal_connect(GTK_OBJECT(radio), "clicked",
00102              GTK_SIGNAL_FUNC(set_element), (void *) set_val);
00103 
00104   /* Make this visible */
00105   gtk_widget_show (radio);
00106 
00107   /* Return the group */
00108   return (gtk_radio_button_group (GTK_RADIO_BUTTON(radio)));
00109 }


Contact: Andy Maloney     [Documentation generated by doxygen]