Commit ff203099 authored by Claes Sjofors's avatar Claes Sjofors

Minor window layout changes

parent c6d05388
......@@ -325,7 +325,7 @@ WVselGtk::WVselGtk (
widgets.volumelist = (GtkWidget *) g_object_new(GTK_TYPE_TREE_VIEW,
"model", store,
"rules-hint", TRUE,
"headers-clickable", TRUE,
"headers-visible", FALSE,
"reorderable", TRUE,
"enable-search", TRUE,
"search-column", 0,
......
......@@ -1567,12 +1567,13 @@ void WttGtk::open_boot_window()
boot_list = (GtkWidget *) g_object_new(GTK_TYPE_TREE_VIEW,
"model", store,
"rules-hint", TRUE,
"headers-clickable", TRUE,
"headers-visible", FALSE,
"reorderable", TRUE,
"enable-search", TRUE,
"search-column", 0,
NULL);
text_renderer = gtk_cell_renderer_text_new();
name_column = gtk_tree_view_column_new_with_attributes( "",
text_renderer,
......@@ -1584,6 +1585,8 @@ void WttGtk::open_boot_window()
NULL);
gtk_tree_view_append_column( GTK_TREE_VIEW(boot_list), name_column);
g_signal_connect( boot_list, "row-activated",
G_CALLBACK(WttGtk::boot_row_activated_cb), this);
GtkWidget *ok_button = gtk_button_new_with_label( "Ok");
gtk_widget_set_size_request( ok_button, 70, 25);
......@@ -1646,6 +1649,14 @@ void WttGtk::boot_destroy_cb(GtkWidget *w, gpointer data)
((WttGtk *)wtt)->boot_dia = 0;
}
void WttGtk::boot_row_activated_cb( GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
gpointer data)
{
boot_ok_cb( 0, data);
}
// Widget callbacks for OK button
void WttGtk::boot_ok_cb(GtkWidget *w, gpointer data)
{
......@@ -2985,6 +2996,8 @@ void WttGtk::create_confirm_dialog()
gtk_box_pack_start( GTK_BOX(confirm_vbox), gtk_hseparator_new(), FALSE, FALSE, 0);
gtk_box_pack_end( GTK_BOX(confirm_vbox), confirm_hboxbuttons, FALSE, FALSE, 15);
gtk_container_add( GTK_CONTAINER(confirm_widget), confirm_vbox);
gtk_window_set_transient_for( GTK_WINDOW(gtk_widget_get_toplevel(confirm_widget)),
GTK_WINDOW(gtk_widget_get_toplevel(toplevel)));
gtk_widget_show_all( confirm_widget);
}
......@@ -3045,6 +3058,8 @@ void WttGtk::create_input_dialog()
gtk_container_add( GTK_CONTAINER(india_widget), india_vbox);
gtk_widget_show_all( india_widget);
g_object_set( india_widget, "visible", FALSE, NULL);
gtk_window_set_transient_for( GTK_WINDOW(gtk_widget_get_toplevel(india_widget)),
GTK_WINDOW(gtk_widget_get_toplevel(toplevel)));
}
GtkWidget *WttGtk::build_menu()
......
......@@ -248,6 +248,10 @@ class WttGtk : public Wtt {
static void boot_cancel_cb(GtkWidget *w, gpointer data);
static void boot_destroy_cb(GtkWidget *w, gpointer data);
static gint boot_delete_cb(GtkWidget *w, GdkEvent *event, gpointer data);
static void boot_row_activated_cb( GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
gpointer data);
static void boot_ok_cb(GtkWidget *w, gpointer data);
static void activate_options_ok( GtkWidget *w, gpointer data);
static void activate_options_apply( GtkWidget *w, gpointer data);
......
......@@ -362,7 +362,7 @@ void *CoWowGtk::CreateList (
ctx->list = (GtkWidget *) g_object_new(GTK_TYPE_TREE_VIEW,
"model", store,
"rules-hint", TRUE,
"headers-clickable", TRUE,
"headers-visible", FALSE,
"reorderable", TRUE,
"enable-search", TRUE,
"search-column", 0,
......
......@@ -488,6 +488,10 @@ AttrGtk::AttrGtk( GtkWidget *a_parent_wid,
int w, h;
gdk_drawable_get_size( pane->window, &w, &h);
gtk_paned_set_position( GTK_PANED(pane), h - 50);
if ( parent_wid)
gtk_window_set_transient_for( GTK_WINDOW(gtk_widget_get_toplevel(toplevel)),
GTK_WINDOW(gtk_widget_get_toplevel((GtkWidget *)parent_wid)));
}
......
......@@ -3019,6 +3019,7 @@ GeGtk::GeGtk( void *x_parent_ctx,
"title", "Input Dialog",
"window-position", GTK_WIN_POS_CENTER,
NULL);
g_signal_connect( india_widget, "delete_event", G_CALLBACK(india_delete_event), this);
india_text = gtk_entry_new();
g_signal_connect( india_text, "activate",
......@@ -3056,6 +3057,9 @@ GeGtk::GeGtk( void *x_parent_ctx,
gtk_container_add( GTK_CONTAINER(india_widget), india_vbox);
gtk_widget_show_all( india_widget);
g_object_set( india_widget, "visible", FALSE, NULL);
gtk_window_set_transient_for( GTK_WINDOW(gtk_widget_get_toplevel(india_widget)),
GTK_WINDOW(gtk_widget_get_toplevel(toplevel)));
// Create a confirm window
confirm_widget = (GtkWidget *) g_object_new( GTK_TYPE_WINDOW,
......@@ -3064,6 +3068,8 @@ GeGtk::GeGtk( void *x_parent_ctx,
"title", "Confirm",
"window-position", GTK_WIN_POS_CENTER,
NULL);
g_signal_connect( confirm_widget, "delete_event", G_CALLBACK(confirm_delete_event), this);
confirm_label = gtk_label_new("Graph Name");
GtkWidget *confirm_image = (GtkWidget *)g_object_new( GTK_TYPE_IMAGE,
......@@ -3097,6 +3103,8 @@ GeGtk::GeGtk( void *x_parent_ctx,
gtk_container_add( GTK_CONTAINER(confirm_widget), confirm_vbox);
gtk_widget_show_all( confirm_widget);
g_object_set( confirm_widget, "visible", FALSE, NULL);
gtk_window_set_transient_for( GTK_WINDOW(gtk_widget_get_toplevel(confirm_widget)),
GTK_WINDOW(gtk_widget_get_toplevel(toplevel)));
// Create a Yes No Dialog
......@@ -3106,6 +3114,7 @@ GeGtk::GeGtk( void *x_parent_ctx,
"title", "Confirm",
"window-position", GTK_WIN_POS_CENTER,
NULL);
g_signal_connect( yesnodia_widget, "delete_event", G_CALLBACK(yesnodia_delete_event), this);
yesnodia_label = gtk_label_new("Graph Name");
GtkWidget *yesnodia_image = (GtkWidget *)g_object_new( GTK_TYPE_IMAGE,
......@@ -3144,6 +3153,8 @@ GeGtk::GeGtk( void *x_parent_ctx,
gtk_container_add( GTK_CONTAINER(yesnodia_widget), yesnodia_vbox);
gtk_widget_show_all( yesnodia_widget);
g_object_set( yesnodia_widget, "visible", FALSE, NULL);
gtk_window_set_transient_for( GTK_WINDOW(gtk_widget_get_toplevel(yesnodia_widget)),
GTK_WINDOW(gtk_widget_get_toplevel(toplevel)));
......
Markdown is supported
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