-/*
+/*
* Version $Id$
*/
on_console_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
gtk_main_quit();
- terminate_console(0);
+ terminate_console(0);
return TRUE;
}
}
}
-/* Define max length of history and how many to delete when it gets there.
- * If you make HIST_DEL > HIST_MAX, you shoot yourself in the foot.
+/* Define max length of history and how many to delete when it gets there.
+ * If you make HIST_DEL > HIST_MAX, you shoot yourself in the foot.
*/
#define HIST_MAX 2500
#define HIST_DEL 500
}
hist_len -= HIST_DEL;
}
- hc = NULL;
+ hc = NULL;
}
/*
gtk_entry_set_text((GtkEntry *)entry1, "");
} else if (event->keyval == KEY_Up) {
if (!hc) {
+ if (!hist) {
+ return FALSE;
+ }
hc = g_list_last(hist);
} else {
hc = g_list_previous(hc);
}
if (!hc) {
+ if (!hist) {
+ return FALSE;
+ }
hc = g_list_first(hist);
}
gtk_entry_set_text((GtkEntry *)entry1, (gchar *)hc->data);
} else if (event->keyval == KEY_Down) {
if (!hc) {
+ if (!hist) {
+ return FALSE;
+ }
hc = g_list_first(hist);
} else {
hc = g_list_next(hc);
}
if (!hc) {
+ if (!hist) {
+ return FALSE;
+ }
hc = g_list_last(hist);
}
gtk_entry_set_text((GtkEntry *)entry1, (gchar *)hc->data);
}
*def++ = 0;
if (strcmp(UA_sock->msg, "job") == 0 ||
- strcmp(UA_sock->msg, "when") == 0) {
+ strcmp(UA_sock->msg, "when") == 0) {
continue;
}
/* Where is an entry box */
if (strcmp(UA_sock->msg, "where") == 0) {
- entry = lookup_widget(run_dialog, "entry_where");
+ entry = lookup_widget(run_dialog, "entry_where");
gtk_entry_set_text(GTK_ENTRY(entry), def);
continue;
}
set_status_ready();
return;
}
-
- bsnprintf(cmd, sizeof(cmd),
- "run job=\"%s\" fileset=\"%s\" level=%s client=\"%s\" pool=\"%s\" "
- "when=\"%s\" where=\"%s\" storage=\"%s\"",
+
+ bsnprintf(cmd, sizeof(cmd),
+ "run job=\"%s\" fileset=\"%s\" level=%s client=\"%s\" pool=\"%s\" "
+ "when=\"%s\" where=\"%s\" storage=\"%s\"",
job, fileset, level, client, pool, when, where, storage);
write_director(cmd);
set_text(cmd, strlen(cmd));
set_status_ready();
return;
}
-
- bsnprintf(cmd, sizeof(cmd),
- "label name=\"%s\" pool=\"%s\" storage=\"%s\" slot=%s",
+
+ bsnprintf(cmd, sizeof(cmd),
+ "label name=\"%s\" pool=\"%s\" storage=\"%s\" slot=%s",
volume, pool, storage, slot);
write_director(cmd);
set_text(cmd, strlen(cmd));
set_status_ready();
return;
}
-
- bsnprintf(cmd, sizeof(cmd),
- "restore select current fileset=\"%s\" client=\"%s\" pool=\"%s\" "
- "storage=\"%s\"", fileset, client, pool, storage);
+
+ bsnprintf(cmd, sizeof(cmd),
+ "restore select current fileset=\"%s\" client=\"%s\" pool=\"%s\" "
+ "storage=\"%s\"", fileset, client, pool, storage);
write_director(cmd);
set_text(cmd, strlen(cmd));
gtk_widget_show(restore_file_selection);
}
*def++ = 0;
if (strcmp(UA_sock->msg, "job") == 0 ||
- strcmp(UA_sock->msg, "when") == 0 ||
- strcmp(UA_sock->msg, "where") == 0 ||
- strcmp(UA_sock->msg, "messages") == 0 ||
- strcmp(UA_sock->msg, "level") == 0 ||
- strcmp(UA_sock->msg, "type") == 0) {
+ strcmp(UA_sock->msg, "when") == 0 ||
+ strcmp(UA_sock->msg, "where") == 0 ||
+ strcmp(UA_sock->msg, "messages") == 0 ||
+ strcmp(UA_sock->msg, "level") == 0 ||
+ strcmp(UA_sock->msg, "type") == 0) {
continue;
}