Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

firstpatch: update text on dialog open

  • Loading branch information...
commit 0c9cf94e948e3226a2225046620a586f28433870 1 parent 56a75ab
@sbourdeauducq sbourdeauducq authored
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/firstpatch.c
View
13 src/firstpatch.c
@@ -64,8 +64,6 @@ static void browse_ok_callback(void *arg)
void init_firstpatch()
{
- const char *firstpatch;
-
appid = mtk_init_app("First patch");
mtk_cmd_seq(appid,
@@ -101,16 +99,19 @@ void init_firstpatch()
mtk_bind(appid, "w", "close", cancel_callback, NULL);
- firstpatch = config_read_string("firstpatch");
- if(firstpatch == NULL) firstpatch = "";
- mtk_cmdf(appid, "e_filename.set(-text \"%s\")", firstpatch);
-
browse_dlg = create_filedialog("Select first patch", 0, "fnp", browse_ok_callback, NULL, NULL, NULL);
}
void open_firstpatch_window()
{
+ const char *firstpatch;
+
if(w_open) return;
w_open = 1;
+
+ firstpatch = config_read_string("firstpatch");
+ if(firstpatch == NULL) firstpatch = "";
+ mtk_cmdf(appid, "e_filename.set(-text \"%s\")", firstpatch);
+
mtk_cmd(appid, "w.open()");
}
Please sign in to comment.
Something went wrong with that request. Please try again.