gfio: change Job->Connect menu item string
authorJens Axboe <axboe@kernel.dk>
Tue, 13 Mar 2012 09:58:59 +0000 (10:58 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 13 Mar 2012 09:58:59 +0000 (10:58 +0100)
Change it from Connect <-> Disconnect, same as how we handle
the button.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
gfio.c

diff --git a/gfio.c b/gfio.c
index 153a383dfe90d4854b0e76fc505aad499e7b4216..02211f4aaded9a99fa845cdf05f8e52cca3331ac 100644 (file)
--- a/gfio.c
+++ b/gfio.c
@@ -485,20 +485,17 @@ static void update_button_states(struct gui *ui, struct gui_entry *ge)
         * invisibible...
         */
        w = gtk_ui_manager_get_widget(ui->uimanager, "/MainMenu/JobMenu/Connect");
         * invisibible...
         */
        w = gtk_ui_manager_get_widget(ui->uimanager, "/MainMenu/JobMenu/Connect");
-       if (w)
-               gtk_widget_set_sensitive(w, connect_state);
+       gtk_widget_set_sensitive(w, connect_state);
+       gtk_menu_item_set_label(GTK_MENU_ITEM(w), connect_str);
 
        w = gtk_ui_manager_get_widget(ui->uimanager, "/MainMenu/JobMenu/Edit job");
 
        w = gtk_ui_manager_get_widget(ui->uimanager, "/MainMenu/JobMenu/Edit job");
-       if (w)
-               gtk_widget_set_sensitive(w, edit_state);
+       gtk_widget_set_sensitive(w, edit_state);
 
        w = gtk_ui_manager_get_widget(ui->uimanager, "/MainMenu/JobMenu/Send job");
 
        w = gtk_ui_manager_get_widget(ui->uimanager, "/MainMenu/JobMenu/Send job");
-       if (w)
-               gtk_widget_set_sensitive(w, send_state);
+       gtk_widget_set_sensitive(w, send_state);
 
        w = gtk_ui_manager_get_widget(ui->uimanager, "/MainMenu/JobMenu/Start job");
 
        w = gtk_ui_manager_get_widget(ui->uimanager, "/MainMenu/JobMenu/Start job");
-       if (w)
-               gtk_widget_set_sensitive(w, start_state);
+       gtk_widget_set_sensitive(w, start_state);
 }
 
 static void gfio_set_state(struct gui_entry *ge, unsigned int state)
 }
 
 static void gfio_set_state(struct gui_entry *ge, unsigned int state)