Compare commits

..

No commits in common. "e6bba9f0eea02f12acd8fe9ab4a5015ff55f216d" and "f444d40071fa394a6c8cb433750db7bfe49469cb" have entirely different histories.

4 changed files with 10 additions and 16 deletions

View File

@ -209,8 +209,7 @@
<object class="GtkLabel" id="label_date_to_date">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;a href=""&gt;to&lt;/a&gt;</property>
<property name="use_markup">True</property>
<property name="label" translatable="yes">to</property>
</object>
<packing>
<property name="expand">False</property>

View File

@ -22,7 +22,7 @@ int main(int argc, char *argv[])
gtk_widget_show(mainWindow->mainWindow);
gtk_main();
mdiary_save_settings(settings_path, settings); //
mdiary_save_settings(settings_path, settings);
mdiary_settings_free(settings);
g_free(settings_path);

View File

@ -322,10 +322,6 @@ static void mainWindow_connect_signals(struct mainWindow *mainWindow)
"focus-in-event",
(GCallback) mainWindow_showPopover,
mainWindow);
g_signal_connect(mainWindow->labelDateToDate,
"activate-link",
(GCallback) mainWindow_showPopover,
mainWindow);
g_signal_connect(mainWindow->calendarRange,
"day-selected",
(GCallback) mainWindow_calendarSelected,
@ -447,7 +443,6 @@ struct mainWindow *mainWindow_new()
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->labelDateToDate = GTK_WIDGET(gtk_builder_get_object(builder, "label_date_to_date"));
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"));
@ -543,16 +538,13 @@ void mainWindow_calendarSelected(GtkWidget *widget, gpointer user_data)
guint year, month, day;
gchar *text;
if (mainWindow->selectedDateEntry) {
gtk_calendar_get_date(GTK_CALENDAR(mainWindow->calendarRange), &year, &month, &day);
text = g_strdup_printf("%d-%02d-%02d", year, month + 1, day);
if (mainWindow->selectedDateEntry == mainWindow->labelDateToDate) {
gtk_entry_set_text(GTK_ENTRY(mainWindow->dateStart), text);
gtk_entry_set_text(GTK_ENTRY(mainWindow->dateEnd), text);
} else if (mainWindow->selectedDateEntry) {
gtk_entry_set_text(GTK_ENTRY(mainWindow->selectedDateEntry), text);
}
g_free(text);
}
}
/**
* @brief mainWindow_entrySelected is the callback when the user selects a diary entry.
@ -766,6 +758,7 @@ void mainWindow_otherWorkspaceClicked(GtkWidget *widget, gpointer user_data)
GtkWidget *dialog;
gint res;
dialog = gtk_file_chooser_dialog_new("Choose Workspace", GTK_WINDOW(mainWindow->mainWindow), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
"Cancel", GTK_RESPONSE_CANCEL,
"Select", GTK_RESPONSE_ACCEPT,
@ -782,4 +775,7 @@ void mainWindow_otherWorkspaceClicked(GtkWidget *widget, gpointer user_data)
}
gtk_widget_destroy (dialog);
g_print("TODO: Show directory browser dialog.\n");
}

View File

@ -30,7 +30,6 @@ struct mainWindow {
GtkWidget *labelSummary;
GtkWidget *buttonClearSearch;
GtkWidget *headerBar;
GtkWidget *labelDateToDate;
GtkTreeView *entryListView;
GtkTreeSelection *entryListSelection;
GtkTextBuffer *textBuffer;