Skip to content
Snippets Groups Projects
Commit 895573b8 authored by rds's avatar rds
Browse files

code in case the function to reparent the button panel to a new toplevel is useful.

parent dedda175
No related branches found
Tags RELEASE_0-1-77
No related merge requests found
......@@ -26,9 +26,9 @@
*
* Exported functions: See zmapTopWindow_P.h
* HISTORY:
* Last edited: Jul 4 09:34 2008 (rds)
* Last edited: Jun 7 00:52 2009 (rds)
* Created: Fri May 7 14:43:28 2004 (edgrif)
* CVS info: $Id: zmapControlWindow.c,v 1.34 2008-07-04 16:01:41 rds Exp $
* CVS info: $Id: zmapControlWindow.c,v 1.35 2009-06-08 09:17:58 rds Exp $
*-------------------------------------------------------------------
*/
......@@ -52,7 +52,6 @@ gboolean zmapControlWindowCreate(ZMap zmap)
GtkWidget *toplevel, *vbox, *menubar, *frame, *controls_box, *button_box, *status_box,
*info_panel_box, *info_box ;
/* Make tooltips groups for the main zmap controls and the feature information. */
zmap->tooltips = gtk_tooltips_new() ;
zmap->feature_tooltips = gtk_tooltips_new() ;
......@@ -87,11 +86,12 @@ gboolean zmapControlWindowCreate(ZMap zmap)
menubar = zmapControlWindowMakeMenuBar(zmap) ;
gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0);
frame = gtk_frame_new(NULL);
gtk_container_border_width(GTK_CONTAINER(frame), 5);
gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, TRUE, 0);
controls_box = gtk_vbox_new(FALSE, 0) ;
zmap->button_info_box = controls_box = gtk_vbox_new(FALSE, 0) ;
gtk_container_add(GTK_CONTAINER(frame), controls_box) ;
info_box = gtk_hbox_new(FALSE, 0) ;
......@@ -103,6 +103,7 @@ gboolean zmapControlWindowCreate(ZMap zmap)
status_box = makeStatusPanel(zmap) ;
gtk_box_pack_end(GTK_BOX(info_box), status_box, FALSE, TRUE, 0) ;
//info_panel_box = zmapControlWindowMakeInfoPanel(zmap) ;
info_panel_box = zmap->info_panel_vbox = gtk_vbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(controls_box), info_panel_box, FALSE, FALSE, 0) ;
......@@ -110,7 +111,6 @@ gboolean zmapControlWindowCreate(ZMap zmap)
zmap->navview_frame = zmapControlWindowMakeFrame(zmap) ;
gtk_box_pack_start(GTK_BOX(vbox), zmap->navview_frame, TRUE, TRUE, 0);
gtk_widget_show_all(toplevel) ;
/* Tooltips can only be added to widgets after the widgets have been "shown". */
......
......@@ -31,9 +31,9 @@
*
* Exported functions: See zmapControl_P.h
* HISTORY:
* Last edited: Jan 13 14:03 2009 (edgrif)
* Last edited: Jun 8 10:08 2009 (rds)
* Created: Thu Jul 24 14:36:59 2003 (edgrif)
* CVS info: $Id: zmapControlWindowMenubar.c,v 1.30 2009-01-13 15:02:02 edgrif Exp $
* CVS info: $Id: zmapControlWindowMenubar.c,v 1.31 2009-06-08 09:17:58 rds Exp $
*-------------------------------------------------------------------
*/
......@@ -68,7 +68,9 @@ static void rtTicket(gpointer cb_data, guint callback_action, GtkWidget *w);
static void allHelpCB(gpointer cb_data, guint callback_action, GtkWidget *w);
static void formatSession(gpointer data, gpointer user_data) ;
static void print_hello( gpointer data, guint callback_action, GtkWidget *w ) ;
#ifdef ALLOW_POPOUT_PANEL
static void popout_panel( gpointer data, guint callback_action, GtkWidget *w ) ;
#endif /* ALLOW_POPOUT_PANEL */
GtkItemFactory *item_factory;
......@@ -97,6 +99,9 @@ static GtkItemFactoryEntry menu_items[] = {
{ "/Edit/P_references", NULL, preferencesCB, 0, NULL },
{ "/Edit/_Set Developer status", NULL, developerCB, 0, NULL },
{ "/_View", NULL, NULL, 0, "<Branch>" },
#ifdef ALLOW_POPOUT_PANEL
{ "/View/'Pop Out' Control Info Panel", NULL, popout_panel, 0, NULL },
#endif /* ALLOW_POPOUT_PANEL */
{ "/View/Statistics", NULL, showStatsCB, 0, NULL },
{ "/View/Session Details", NULL, showSessionCB, 0, NULL },
{ "/_Raise ticket", NULL, NULL, 0, "<LastBranch>" },
......@@ -449,9 +454,18 @@ static void handle_option( gpointer data, guint callback_action, GtkWidget *w )
#endif /* ED_G_NEVER_INCLUDE_THIS_CODE */
#ifdef ALLOW_POPOUT_PANEL
static void popout_panel( gpointer data, guint callback_action, GtkWidget *w )
{
GtkWidget *toplevel;
ZMap zmap = (ZMap)data;
if((toplevel = zMapGUIPopOutWidget(zmap->button_info_box, zmap->zmap_id)))
gtk_widget_show_all(toplevel);
return ;
}
#endif /* ALLOW_POPOUT_PANEL */
/* Load a new sequence into a zmap. */
static void newCB(gpointer cb_data, guint callback_action, GtkWidget *w)
......
......@@ -25,9 +25,9 @@
* Description: Private header for interface that creates/manages/destroys
* instances of ZMaps.
* HISTORY:
* Last edited: May 8 14:48 2009 (edgrif)
* Last edited: Jun 7 00:44 2009 (rds)
* Created: Thu Jul 24 14:39:06 2003 (edgrif)
* CVS info: $Id: zmapControl_P.h,v 1.72 2009-05-08 14:44:39 edgrif Exp $
* CVS info: $Id: zmapControl_P.h,v 1.73 2009-06-08 09:17:58 rds Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_CONTROL_P_H
......@@ -100,6 +100,7 @@ typedef struct _ZMapStruct
GtkWidget *hpane ; /* Holds the navigator and the view(s). */
GtkWidget *button_info_box;
/* Main control buttons. */
GtkWidget *stop_button, *load_button,
......
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