Headerbar now updates with the workspace URL
This commit is contained in:
parent
e9ca1ce259
commit
f444d40071
@ -390,7 +390,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
<object class="GtkHeaderBar" id="headerBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title">MDiary</property>
|
||||
|
@ -442,6 +442,7 @@ struct mainWindow *mainWindow_new()
|
||||
mainWindow->checkSearchText = GTK_WIDGET(gtk_builder_get_object(builder, "checkSearchText"));
|
||||
mainWindow->labelSummary = GTK_WIDGET(gtk_builder_get_object(builder, "labelSummary"));
|
||||
mainWindow->buttonClearSearch = GTK_WIDGET(gtk_builder_get_object(builder, "buttonClearSearch"));
|
||||
mainWindow->headerBar = GTK_WIDGET(gtk_builder_get_object(builder, "headerBar"));
|
||||
mainWindow->entryListView = GTK_TREE_VIEW(gtk_builder_get_object(builder, "entryListView"));
|
||||
mainWindow->entryListSelection = GTK_TREE_SELECTION(gtk_builder_get_object(builder, "entryListSelection"));
|
||||
mainWindow->textBuffer = GTK_TEXT_BUFFER(gtk_builder_get_object(builder, "entryTextBuffer"));
|
||||
@ -716,7 +717,9 @@ void mainWindow_switch_workspace(struct mainWindow *mainWindow, gchar *path)
|
||||
mdiary_get_time_earliest(), mdiary_get_time_latest(),
|
||||
FALSE);
|
||||
mainWindow_add_recent_workspace(mainWindow, path, FALSE);
|
||||
gtk_header_bar_set_subtitle(GTK_HEADER_BAR(mainWindow->headerBar), path);
|
||||
} else {
|
||||
gtk_header_bar_set_subtitle(GTK_HEADER_BAR(mainWindow->headerBar), "No workspace opened.");
|
||||
mainWindow_show_error(mainWindow, "Could not open workspace or no entries were found in it.");
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,7 @@ struct mainWindow {
|
||||
GtkWidget *checkSearchText;
|
||||
GtkWidget *labelSummary;
|
||||
GtkWidget *buttonClearSearch;
|
||||
GtkWidget *headerBar;
|
||||
GtkTreeView *entryListView;
|
||||
GtkTreeSelection *entryListSelection;
|
||||
GtkTextBuffer *textBuffer;
|
||||
|
Loading…
Reference in New Issue
Block a user