ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/src account.c,1.11,1.12 dialog.c,1.13,1.14 d


From: Philip S Tellis <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src account.c,1.11,1.12 dialog.c,1.13,1.14 dialog.h,1.8,1.9
Date: Thu, 23 Jan 2003 01:34:28 -0500

Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv7876/src

Modified Files:
        account.c dialog.c dialog.h 
Log Message:
added do_message_dialog - modal or modeless

Index: account.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/account.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- account.c   20 Jan 2003 20:33:18 -0000      1.11
+++ account.c   23 Jan 2003 06:34:26 -0000      1.12
@@ -44,7 +44,7 @@
         * the Nomenclature file in the docs directory for details
         */
 
-       g_snprintf(buff2, 1024, "%saccounts", config_dir);
+       snprintf(buff2, 1024, "%saccounts", config_dir);
        if(! (fp = fdopen( creat(buff2, S_IRWXU), "w") ) )
                return;
 
@@ -87,7 +87,7 @@
         * the Nomenclature file in the docs directory for details
         */
 
-       g_snprintf(buff2, 1024, "%scontacts", config_dir);
+       snprintf(buff2, 1024, "%scontacts", config_dir);
        if(!(fp = fdopen(creat(buff2,0700),"w")))
                return;
 
@@ -134,7 +134,7 @@
        extern int accountparse();
        extern FILE * accountin;
 
-       g_snprintf(buff2, 1024, "%saccounts",config_dir);
+       snprintf(buff2, 1024, "%saccounts",config_dir);
 
        if(!(fp = fopen(buff2,"r")))
                return 0;
@@ -159,7 +159,7 @@
        extern int contactparse();
        extern FILE * contactin;
        GList *cts = NULL;
-       g_snprintf(buff2, 1024, "%scontacts",config_dir);
+       snprintf(buff2, 1024, "%scontacts",config_dir);
 
        if(!(fp = fopen(buff2,"r")))
                return 0;

Index: dialog.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/dialog.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- dialog.c    20 Jan 2003 20:33:18 -0000      1.13
+++ dialog.c    23 Jan 2003 06:34:26 -0000      1.14
@@ -347,34 +347,39 @@
 /*------------------------------------------------------------------------*/
 
 void
-do_error_dialog(char *message, char *title)
+do_message_dialog(char *message, char *title, int modal)
 {
-    GtkWidget *d;
-    GtkWidget *label;
-    GtkWidget *close;
+       GtkWidget *d;
+       GtkWidget *label;
+       GtkWidget *close;
 
 
-    d = gtk_dialog_new();
-    label = gtk_label_new(message);
-    gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-    gtk_widget_show(label);
-    close = gtk_button_new_with_label(_("   OK   "));
-    gtk_widget_show(close);
-    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->vbox),
-        label, TRUE, TRUE, 5);
-    gtk_box_pack_end(GTK_BOX(GTK_DIALOG(d)->action_area),
-        close, FALSE, FALSE, 5);
-    /* so text isn't up against the border */
-    gtk_container_set_border_width(GTK_CONTAINER(d), 5);
-    gtk_widget_realize(d);
-    gtk_window_set_title(GTK_WINDOW(d), title);
-    gtk_window_set_position(GTK_WINDOW(d), GTK_WIN_POS_MOUSE);
-    gtk_signal_connect_object(GTK_OBJECT(close), "clicked", 
GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(d));
-       gtk_window_set_modal(GTK_WINDOW(d), TRUE);
-    gtk_widget_show(d);
-    gtk_widget_grab_focus(close);
+       d = gtk_dialog_new();
+       label = gtk_label_new(message);
+       gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
+       gtk_widget_show(label);
+       close = gtk_button_new_with_label(_("   OK   "));
+       gtk_widget_show(close);
+       gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->vbox),
+       label, TRUE, TRUE, 5);
+       gtk_box_pack_end(GTK_BOX(GTK_DIALOG(d)->action_area),
+                       close, FALSE, FALSE, 5);
+       /* so text isn't up against the border */
+       gtk_container_set_border_width(GTK_CONTAINER(d), 5);
+       gtk_widget_realize(d);
+       gtk_window_set_title(GTK_WINDOW(d), title);
+       gtk_window_set_position(GTK_WINDOW(d), GTK_WIN_POS_MOUSE);
+       gtk_signal_connect_object(GTK_OBJECT(close), "clicked", 
GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(d));
+       gtk_window_set_modal(GTK_WINDOW(d), modal);
+       gtk_widget_show(d);
+       gtk_widget_grab_focus(close);
 }
 
+void
+do_error_dialog(char *message, char *title)
+{
+       do_message_dialog(message, title, 1)
+}
 
 /*
  * The following methods are for the text input window

Index: dialog.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/dialog.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- dialog.h    21 Jan 2003 05:31:19 -0000      1.8
+++ dialog.h    23 Jan 2003 06:34:26 -0000      1.9
@@ -88,11 +88,12 @@
 
 
 /* TODO Check header in sound.c */
+void do_message_dialog(char *message, char *title, int modal);
 void 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_icon(GdkWindow *);
 
 #ifdef __cplusplus
 } /* extern "C" */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]