Commit a034befd authored by Claes Sjofors's avatar Claes Sjofors

Resolution buttons disabled in some curve windows

parent 647216f2
......@@ -200,6 +200,12 @@ void GeCurveGtk::activate_minmax_cancel( GtkWidget *w, gpointer data)
g_object_set( ((GeCurveGtk *)curve)->minmax_widget, "visible", FALSE, NULL);
}
void GeCurveGtk::enable_resolution_buttons()
{
g_object_set( tools_higher_res, "visible", TRUE, NULL);
g_object_set( tools_lower_res, "visible", TRUE, NULL);
}
void GeCurveGtk::pop()
{
gtk_window_present( GTK_WINDOW(toplevel));
......@@ -478,16 +484,16 @@ GeCurveGtk::GeCurveGtk( void *gc_parent_ctx,
g_object_set( tools_page_right, "can-focus", FALSE, NULL);
gtk_toolbar_append_widget( tools, tools_page_right, CoWowGtk::translate_utf8("Page right"), "");
GtkWidget *tools_higher_res = gtk_button_new();
dcli_translate_filename( fname, "$pwr_exe/ge_redo.png");
tools_higher_res = gtk_button_new();
dcli_translate_filename( fname, "$pwr_exe/xtt_up.png");
gtk_container_add( GTK_CONTAINER(tools_higher_res),
gtk_image_new_from_file( fname));
g_signal_connect(tools_higher_res, "clicked", G_CALLBACK(activate_higher_res), this);
g_object_set( tools_higher_res, "can-focus", FALSE, NULL);
gtk_toolbar_append_widget( tools, tools_higher_res, CoWowGtk::translate_utf8("Higer resolution"), "");
GtkWidget *tools_lower_res = gtk_button_new();
dcli_translate_filename( fname, "$pwr_exe/ge_undo.png");
tools_lower_res = gtk_button_new();
dcli_translate_filename( fname, "$pwr_exe/xtt_down.png");
gtk_container_add( GTK_CONTAINER(tools_lower_res),
gtk_image_new_from_file( fname));
g_signal_connect(tools_lower_res, "clicked", G_CALLBACK(activate_lower_res), this);
......@@ -530,6 +536,8 @@ GeCurveGtk::GeCurveGtk( void *gc_parent_ctx,
gtk_paned_set_position( GTK_PANED(vpaned1), names_height);
gtk_paned_set_position( GTK_PANED(vpaned2), window_height - names_height - nav_height - 50);
g_object_set( tools_higher_res, "visible", FALSE, NULL);
g_object_set( tools_lower_res, "visible", FALSE, NULL);
wow = new CoWowGtk( toplevel);
}
......
......@@ -47,6 +47,8 @@ class GeCurveGtk : public GeCurve {
GtkWidget *minmax_widget;
GtkWidget *minmax_textmin_widget;
GtkWidget *minmax_textmax_widget;
GtkWidget *tools_higher_res;
GtkWidget *tools_lower_res;
CoWowFocusTimerGtk focustimer;
void pop();
......@@ -56,6 +58,7 @@ class GeCurveGtk : public GeCurve {
void axis_set_width( int width);
void create_minmax_dialog();
void set_inputfocus();
void enable_resolution_buttons();
~GeCurveGtk();
......
......@@ -145,6 +145,7 @@ class GeCurve {
virtual void resize() {}
virtual void open_minmax( int idx) {}
virtual void axis_set_width( int width) {}
virtual void enable_resolution_buttons() {}
void set_inputfocus() {}
int read_file( char *filename);
......
......@@ -67,6 +67,7 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx,
curve->help_cb = sevhist_help_cb;
curve->higher_res_cb = sevhist_higher_res_cb;
curve->lower_res_cb = sevhist_lower_res_cb;
curve->enable_resolution_buttons();
wow = new CoWowGtk( parent_widget);
timerid = wow->timer_new();
......
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