summaryrefslogtreecommitdiffstats
path: root/src/toolbars/navigation
diff options
context:
space:
mode:
Diffstat (limited to 'src/toolbars/navigation')
-rw-r--r--src/toolbars/navigation/main-menu.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/src/toolbars/navigation/main-menu.c b/src/toolbars/navigation/main-menu.c
index 6d875ad..a9f5cd3 100644
--- a/src/toolbars/navigation/main-menu.c
+++ b/src/toolbars/navigation/main-menu.c
@@ -25,6 +25,8 @@
#include <gtk/gtk.h>
#include <webkit2/webkit2.h>
+#include "../../application.h"
+#include "../../config/profiles.h"
#include "../../notebook.h"
#include "../../tab-page.h"
#include "../../utils/profile-icon.h"
@@ -360,15 +362,29 @@ create_main_grid(MqMainMenu *main_menu)
static GtkWidget *
create_profile_buttons(MqMainMenu *main_menu)
{
- GtkWidget *profile_button;
- GtkWidget *preferences_button;
- GtkWidget *grid;
-
- /* ID, ICON, LABEL, TOOLTIP */
- NEW_BUTTON(profile, NULL, "Default", "Manage profiles");
+ MqProfiles *profiles;
+ gchar *cur_prof;
+ gchar *cur_prof_name;
+ gchar *cur_prof_color;
+ GtkWidget *profile_button;
+ GtkWidget *preferences_button;
+ GtkWidget *grid;
+
+ profiles = mq_application_get_profiles(
+ mq_tab_page_get_application(main_menu->tab_page));
+ cur_prof = mq_profiles_get_current(profiles);
+ cur_prof_name = mq_profiles_get_name(profiles, cur_prof);
+ cur_prof_color = mq_profiles_get_color(profiles, cur_prof);
+
+ /* ID, ICON, LABEL, TOOLTIP */
+ NEW_BUTTON(profile, NULL, cur_prof_name, "Manage profiles");
gtk_button_set_image(GTK_BUTTON(profile_button),
gtk_image_new_from_pixbuf(
- mq_profile_icon_new_pixbuf("#0000ff")));
+ mq_profile_icon_new_pixbuf(cur_prof_color)));
+
+ g_free(cur_prof);
+ g_free(cur_prof_name);
+ g_free(cur_prof_color);
/* ID, ICON, LABEL, TOOLTIP */
NEW_BUTTON(preferences, "preferences-desktop", NULL, "Preferences");