Skip to content
Snippets Groups Projects
Commit 4f6fe8c4 authored by edgrif's avatar edgrif
Browse files

change show message func. to allow specifying of text justification.

parent 119d0c7b
No related branches found
No related tags found
No related merge requests found
......@@ -25,9 +25,9 @@
* Description: Set of general GUI functions.
*
* HISTORY:
* Last edited: Feb 20 10:08 2006 (edgrif)
* Last edited: Mar 21 13:33 2006 (edgrif)
* Created: Fri Nov 4 16:59:52 2005 (edgrif)
* CVS info: $Id: zmapUtilsGUI.h,v 1.7 2006-02-21 15:06:55 edgrif Exp $
* CVS info: $Id: zmapUtilsGUI.h,v 1.8 2006-03-21 14:07:39 edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_UTILS_GUI_H
......@@ -73,7 +73,7 @@ void zMapGUIGetPixelsPerUnit(ZMapGUIPixelConvType conv_type, GtkWidget *widget,
char *zMapGUIMakeTitleString(char *window_type, char *message) ;
void zMapGUIShowMsg(ZMapMsgType msg_type, char *msg) ;
void zMapGUIShowMsgOnTop(GtkWindow *parent, ZMapMsgType msg_type, char *msg) ;
void zMapGUIShowMsgFull(GtkWindow *parent, char *msg, ZMapMsgType msg_type, GtkJustification justify) ;
gboolean zMapGUIShowChoice(GtkWindow *parent, ZMapMsgType msg_type, char *msg) ;
void zMapGUIShowAbout(void) ;
......
......@@ -25,9 +25,9 @@
* Description:
* Exported functions: See ZMap/zmapUtilsGUI.h
* HISTORY:
* Last edited: Mar 17 13:16 2006 (edgrif)
* Last edited: Mar 21 13:38 2006 (edgrif)
* Created: Thu Jul 24 14:37:35 2003 (edgrif)
* CVS info: $Id: zmapGUIutils.c,v 1.13 2006-03-17 17:01:49 edgrif Exp $
* CVS info: $Id: zmapGUIutils.c,v 1.14 2006-03-21 14:07:39 edgrif Exp $
*-------------------------------------------------------------------
*/
......@@ -144,7 +144,7 @@ void zMapGUIShowAbout(void)
* */
void zMapGUIShowMsg(ZMapMsgType msg_type, char *msg)
{
zMapGUIShowMsgOnTop(NULL, msg_type, msg) ;
zMapGUIShowMsgFull(NULL, msg, msg_type, GTK_JUSTIFY_CENTER) ;
return ;
}
......@@ -167,7 +167,9 @@ void zMapGUIShowMsg(ZMapMsgType msg_type, char *msg)
* @param msg Message to be displayed in dialog.
* @return nothing
* */
void zMapGUIShowMsgOnTop(GtkWindow *parent, ZMapMsgType msg_type, char *msg)
void zMapGUIShowMsgFull(GtkWindow *parent, char *msg,
ZMapMsgType msg_type,
GtkJustification justify)
{
GtkWidget *dialog, *button, *label ;
char *title = NULL ;
......@@ -214,7 +216,7 @@ void zMapGUIShowMsgOnTop(GtkWindow *parent, ZMapMsgType msg_type, char *msg)
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), button, TRUE, TRUE, 20);
gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE) ;
label = gtk_bin_get_child(GTK_BIN(button)) ; /* Center + wrap long lines. */
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER) ;
gtk_label_set_justify(GTK_LABEL(label), justify) ;
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE) ;
gtk_signal_connect(GTK_OBJECT(button), "clicked",
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment