X-Git-Url: https://git.wpitchoune.net/gitweb/?p=psensor.git;a=blobdiff_plain;f=src%2Fui.c;fp=src%2Fui.c;h=1ce84eae1a3dac5a5a0c6f9f96eb287e59f985ba;hp=c503800dc0154f45931bac23c50124463966ac2f;hb=c1e20f2631a1249720e9c75d753eacfcb0f6c7b9;hpb=e6444eb3fa27922e70f4ae2bbcd32a3d6f295ab8 diff --git a/src/ui.c b/src/ui.c index c503800..1ce84ea 100644 --- a/src/ui.c +++ b/src/ui.c @@ -398,20 +398,6 @@ void ui_window_create(struct ui_psensor *ui) log_debug("ui_window_create() ends"); } -void ui_window_update(struct ui_psensor *ui) -{ - struct config *cfg; - - log_debug("ui_window_update()"); - - cfg = ui->config; - - if (cfg->window_restore_enabled) - gtk_paned_set_position(GTK_PANED(w_sensor_box), - cfg->window_divider_pos); - -} - void ui_window_show(struct ui_psensor *ui) { struct config *cfg; @@ -419,12 +405,13 @@ void ui_window_show(struct ui_psensor *ui) log_debug("ui_window_show()"); cfg = ui->config; - if (cfg->window_restore_enabled) + if (cfg->window_restore_enabled) { + gtk_paned_set_position(GTK_PANED(w_sensor_box), + cfg->window_divider_pos); gtk_window_move(GTK_WINDOW(ui->main_window), cfg->window_x, cfg->window_y); - - ui_window_update(ui); + } gtk_window_present(GTK_WINDOW(ui->main_window)); }