Completed refresh-execp
This commit is contained in:
+474
-460
File diff suppressed because it is too large
Load Diff
+474
-460
File diff suppressed because it is too large
Load Diff
+474
-460
File diff suppressed because it is too large
Load Diff
+474
-460
File diff suppressed because it is too large
Load Diff
+474
-460
File diff suppressed because it is too large
Load Diff
+474
-460
File diff suppressed because it is too large
Load Diff
+474
-460
File diff suppressed because it is too large
Load Diff
+475
-461
File diff suppressed because it is too large
Load Diff
@@ -4271,6 +4271,23 @@ void create_execp(GtkWidget *notebook, int i)
|
||||
gtk_table_set_col_spacings(GTK_TABLE(table), COL_SPACING);
|
||||
row = 0, col = 2;
|
||||
|
||||
label = gtk_label_new(_("Name"));
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
|
||||
gtk_widget_show(label);
|
||||
gtk_table_attach(GTK_TABLE(table), label, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
|
||||
col++;
|
||||
|
||||
executor->execp_name = gtk_entry_new();
|
||||
gtk_widget_show(executor->execp_name);
|
||||
gtk_entry_set_width_chars(GTK_ENTRY(executor->execp_name), 20);
|
||||
gtk_entry_set_max_length(GTK_ENTRY(executor->execp_name), 20);
|
||||
gtk_table_attach(GTK_TABLE(table), executor->execp_name, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
|
||||
col++;
|
||||
gtk_widget_set_tooltip_text(executor->execp_name,
|
||||
_("Specifies a name that can be used with `tint2-send refresh-execp` to re-execute "
|
||||
"the command."));
|
||||
|
||||
row++, col = 2;
|
||||
label = gtk_label_new(_("Command"));
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
|
||||
gtk_widget_show(label);
|
||||
|
||||
@@ -132,6 +132,7 @@ typedef struct Executor {
|
||||
GtkWidget *container;
|
||||
GtkWidget *page_execp;
|
||||
GtkWidget *page_label;
|
||||
GtkWidget *execp_name;
|
||||
GtkWidget *execp_command, *execp_interval, *execp_has_icon, *execp_cache_icon, *execp_show_tooltip;
|
||||
GtkWidget *execp_continuous, *execp_markup, *execp_tooltip, *execp_monitor;
|
||||
GtkWidget *execp_left_command, *execp_right_command;
|
||||
|
||||
@@ -857,6 +857,7 @@ void config_write_execp(FILE *fp)
|
||||
Executor *executor = &g_array_index(executors, Executor, i);
|
||||
|
||||
fprintf(fp, "execp = new\n");
|
||||
fprintf(fp, "execp_name = %s\n", gtk_entry_get_text(GTK_ENTRY(executor->execp_name)));
|
||||
fprintf(fp, "execp_command = %s\n", gtk_entry_get_text(GTK_ENTRY(executor->execp_command)));
|
||||
fprintf(fp, "execp_interval = %d\n", (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(executor->execp_interval)));
|
||||
fprintf(fp,
|
||||
@@ -1962,6 +1963,8 @@ void add_entry(char *key, char *value)
|
||||
/* Executor */
|
||||
else if (strcmp(key, "execp") == 0) {
|
||||
execp_create_new();
|
||||
} else if (strcmp(key, "execp_name") == 0) {
|
||||
gtk_entry_set_text(GTK_ENTRY(execp_get_last()->execp_name), value);
|
||||
} else if (strcmp(key, "execp_command") == 0) {
|
||||
gtk_entry_set_text(GTK_ENTRY(execp_get_last()->execp_command), value);
|
||||
} else if (strcmp(key, "execp_interval") == 0) {
|
||||
|
||||
Reference in New Issue
Block a user