summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2012-09-10 19:41:43 +0100
committerGravatar Alan Fitton <ajf@eth0.org.uk>2012-09-10 19:41:43 +0100
commitf09a932a7c36d3fe80551153b12f677d3a44a398 (patch)
treedaefa85e539da69addc1967f522bd62f81b80665
parent6b9bee080168767bb3c4e06a8a7787a9dd0b5827 (diff)
parenta14c409e965cf8249bcd633c2c86334a7492b648 (diff)
-rw-r--r--src/trg-main-window.c32
-rw-r--r--src/trg-toolbar.c3
2 files changed, 25 insertions, 10 deletions
diff --git a/src/trg-main-window.c b/src/trg-main-window.c
index acdef89..c1fed1d 100644
--- a/src/trg-main-window.c
+++ b/src/trg-main-window.c
@@ -597,20 +597,25 @@ void connect_cb(GtkWidget * w, gpointer data)
switch (populate_result) {
case TRG_NO_HOSTNAME_SET:
- msg = _("No hostname set");
+ msg = _("No host specified. Set it in the preferences dialog.");
break;
default:
msg = _("Unknown error getting settings");
break;
}
- dialog = gtk_message_dialog_new(GTK_WINDOW(data),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- "%s", msg);
- gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
+ dialog = gtk_message_dialog_new(GTK_WINDOW(data),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ (populate_result == TRG_NO_HOSTNAME_SET) ? GTK_MESSAGE_INFO : GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ "%s", msg);
+ gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
reset_connect_args(TRG_MAIN_WINDOW(data));
+
+ if (populate_result == TRG_NO_HOSTNAME_SET)
+ open_local_prefs_cb (NULL, win);
+
return;
}
@@ -2636,6 +2641,7 @@ static GObject *trg_main_window_constructor(GType type,
GtkWidget *w;
GtkWidget *outerVbox;
GtkWidget *toolbarHbox;
+ GtkWidget *outerAlignment;
GtkIconTheme *theme;
gint width, height, pos;
gboolean tray;
@@ -2698,8 +2704,15 @@ static GObject *trg_main_window_constructor(GType type,
g_signal_connect(priv->torrentTreeView, "row-activated",
G_CALLBACK(torrent_tv_onRowActivated), self);
- outerVbox = trg_vbox_new(FALSE, 0);
- gtk_container_add(GTK_CONTAINER(self), outerVbox);
+ outerVbox = trg_vbox_new(FALSE, 6);
+
+ /* Create a GtkAlignment to hold the outerVbox making possible
+ * some padding. */
+ outerAlignment = gtk_alignment_new (0.5f, 0.5f, 1.0f, 1.0f);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (outerAlignment), 0, 0, 6, 6);
+ gtk_container_add (GTK_CONTAINER (outerAlignment), outerVbox);
+
+ gtk_container_add(GTK_CONTAINER(self), outerAlignment);
priv->menuBar = trg_main_window_menu_bar_new(self);
gtk_box_pack_start(GTK_BOX(outerVbox), GTK_WIDGET(priv->menuBar),
@@ -2891,3 +2904,4 @@ TrgMainWindow *trg_main_window_new(TrgClient * tc, gboolean minonstart)
return g_object_new(TRG_TYPE_MAIN_WINDOW, "trg-client", tc,
"min-on-start", minonstart, NULL);
}
+
diff --git a/src/trg-toolbar.c b/src/trg-toolbar.c
index 139f9db..fb81364 100644
--- a/src/trg-toolbar.c
+++ b/src/trg-toolbar.c
@@ -188,12 +188,13 @@ static GObject *trg_toolbar_constructor(GType type,
gtk_toolbar_set_icon_size(GTK_TOOLBAR(obj),
GTK_ICON_SIZE_LARGE_TOOLBAR);
- gtk_toolbar_set_style(GTK_TOOLBAR(obj), GTK_TOOLBAR_ICONS);
+ gtk_toolbar_set_style(GTK_TOOLBAR(obj), GTK_TOOLBAR_BOTH_HORIZ);
priv->tb_connect =
GTK_WIDGET(gtk_menu_tool_button_new_from_stock(GTK_STOCK_CONNECT));
gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(priv->tb_connect),
_("Connect"));
+ gtk_tool_item_set_is_important (GTK_TOOL_ITEM (priv->tb_connect), TRUE);
menu =
trg_menu_bar_file_connect_menu_new(priv->main_window, priv->prefs);
gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(priv->tb_connect),