From: Kern Sibbald Date: Sat, 3 May 2003 10:39:34 +0000 (+0000) Subject: First cut label dialog X-Git-Tag: Release-1.31~174 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=835f31a59a7e0cbde39f5173a8e7ebab886adce9;p=bacula%2Fbacula First cut label dialog git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@482 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/console.glade b/bacula/src/console.glade index 9b3ed3aa0f..71a9eab4dc 100644 --- a/bacula/src/console.glade +++ b/bacula/src/console.glade @@ -318,6 +318,19 @@ GNOME_STOCK_PIXMAP_REVERT + + + GtkButton + Toolbar:button + label_button + + clicked + on_label_button_clicked + Sat, 03 May 2003 08:57:51 GMT + + + GNOME_STOCK_PIXMAP_SAVE_AS + @@ -2211,4 +2224,305 @@ + + GtkDialog + label_dialog + Label a Volume + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER + True + False + False + True + + + GtkVBox + Dialog:vbox + dialog-vbox9 + False + 0 + + + GtkHBox + Dialog:action_area + dialog-action_area8 + 10 + True + 5 + + 0 + False + True + GTK_PACK_END + + + + GtkHButtonBox + hbuttonbox3 + GTK_BUTTONBOX_END + 8 + 85 + 27 + 7 + 0 + + 0 + True + True + + + + GtkButton + label_ok + True + True + + clicked + on_label_ok_clicked + Sat, 03 May 2003 09:58:59 GMT + + GNOME_STOCK_BUTTON_OK + GTK_RELIEF_NORMAL + + + + GtkButton + label_cancel + True + True + + clicked + on_label_cancel_clicked + Sat, 03 May 2003 10:00:11 GMT + + GNOME_STOCK_BUTTON_CANCEL + GTK_RELIEF_NORMAL + + + + + + GtkVBox + vbox16 + False + 0 + + 0 + False + True + + + + GtkLabel + label106 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 9 + + 0 + False + False + + + + + GtkHBox + hbox45 + 5 + False + 0 + + 0 + False + True + + + + GtkLabel + label107 + 70 + + GTK_JUSTIFY_CENTER + False + 0.15 + 0.5 + 0 + 0 + + 0 + True + True + + + + + GtkCombo + label_combo_storage + True + False + False + True + False + + + + 15 + True + True + + + + GtkEntry + GtkCombo:entry + entry26 + True + False + True + 0 + + + + + + Placeholder + + + + + GtkHBox + hbox46 + 5 + False + 0 + + 0 + False + True + + + + GtkLabel + label109 + 70 + + GTK_JUSTIFY_LEFT + False + 0.12 + 0.5 + 0 + 0 + + 0 + True + True + + + + + GtkCombo + label_combo_pool + True + False + False + True + False + + + + 14 + True + True + + + + GtkEntry + GtkCombo:entry + entry27 + True + False + True + 0 + + + + + + Placeholder + + + + + GtkHBox + hbox47 + 5 + False + 0 + + 0 + False + True + + + + GtkLabel + label111 + 70 + + GTK_JUSTIFY_LEFT + False + 0.18 + 0.5 + 0 + 0 + + 0 + True + True + + + + + GtkEntry + label_entry_volume + True + True + True + 0 + + + 0 + True + True + + + + + Placeholder + + + + + GtkLabel + label113 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + + + + + + diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index 2e5128acfa..3381a6063e 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -241,11 +241,11 @@ static int addcmd(UAContext *ua, char *cmd) } getVolName: if (num == 0) { - if (!get_cmd(ua, _("Enter Volume name: "))) { + if (!get_cmd(ua, _("Enter Volume name: ")) || ua->cmd[0] == '.') { return 1; } } else { - if (!get_cmd(ua, _("Enter base volume name: "))) { + if (!get_cmd(ua, _("Enter base volume name: ")) || ua->cmd[0] == '.') { return 1; } } @@ -284,7 +284,7 @@ getVolName: } if (store && store->autochanger) { - if (!get_cmd(ua, _("Enter slot (0 for none): "))) { + if (!get_cmd(ua, _("Enter slot (0 for none): ")) || ua->cmd[0] == '.') { return 1; } slot = atoi(ua->cmd); diff --git a/bacula/src/dird/ua_label.c b/bacula/src/dird/ua_label.c index 7c1b1ac314..554dc7cc33 100644 --- a/bacula/src/dird/ua_label.c +++ b/bacula/src/dird/ua_label.c @@ -205,7 +205,7 @@ checkVol: /* Get a new Volume name */ for ( ;; ) { - if (!get_cmd(ua, _("Enter new Volume name: "))) { + if (!get_cmd(ua, _("Enter new Volume name: ")) || ua->cmd[0] == '.') { return 1; } checkName: @@ -226,7 +226,7 @@ checkName: /* If autochanger, request slot */ if (store->autochanger) { for ( ;; ) { - if (!get_cmd(ua, _("Enter slot (0 for none): "))) { + if (!get_cmd(ua, _("Enter slot (0 for none): ")) || ua->cmd[0] == '.') { return 1; } mr.Slot = atoi(ua->cmd); diff --git a/bacula/src/dird/ua_select.c b/bacula/src/dird/ua_select.c index da1d99f07d..c34ccc4657 100644 --- a/bacula/src/dird/ua_select.c +++ b/bacula/src/dird/ua_select.c @@ -366,26 +366,12 @@ int select_client_dbr(UAContext *ua, CLIENT_DBR *cr) */ int get_pool_dbr(UAContext *ua, POOL_DBR *pr) { - int i; - if (pr->Name[0]) { /* If name already supplied */ if (db_get_pool_record(ua->jcr, ua->db, pr)) { return pr->PoolId; } bsendmsg(ua, _("Could not find Pool %s: ERR=%s"), pr->Name, db_strerror(ua->db)); } - for (i=1; iargc; i++) { - if (strcasecmp(ua->argk[i], _("pool")) == 0 && ua->argv[i]) { - bstrncpy(pr->Name, ua->argv[i], sizeof(pr->Name)); - if (!db_get_pool_record(ua->jcr, ua->db, pr)) { - bsendmsg(ua, _("Could not find Pool %s: ERR=%s"), ua->argv[i], - db_strerror(ua->db)); - pr->PoolId = 0; - break; - } - return pr->PoolId; - } - } if (!select_pool_dbr(ua, pr)) { /* try once more */ return 0; } @@ -402,6 +388,18 @@ int select_pool_dbr(UAContext *ua, POOL_DBR *pr) int num_pools, i; uint32_t *ids; + for (i=1; iargc; i++) { + if (strcasecmp(ua->argk[i], _("pool")) == 0 && ua->argv[i]) { + bstrncpy(pr->Name, ua->argv[i], sizeof(pr->Name)); + if (!db_get_pool_record(ua->jcr, ua->db, pr)) { + bsendmsg(ua, _("Could not find Pool %s: ERR=%s"), ua->argv[i], + db_strerror(ua->db)); + pr->PoolId = 0; + break; + } + return 1; + } + } pr->PoolId = 0; if (!db_get_pool_ids(ua->jcr, ua->db, &num_pools, &ids)) { diff --git a/bacula/src/version.h b/bacula/src/version.h index 6816566400..843cd4e467 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ #define VERSION "1.30a" #define VSTRING "1" -#define BDATE "02 May 2003" -#define LSMDATE "02May03" +#define BDATE "03 May 2003" +#define LSMDATE "03May03" /* Debug flags */ #define DEBUG 1