Add button to open the workspace directory to the settings window
This commit is contained in:
parent
be80d71b09
commit
e4f711b310
@ -640,6 +640,19 @@
|
|||||||
<property name="position">0</property>
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="buttonOpenWorkspaceFolder">
|
||||||
|
<property name="label" translatable="yes">Open Workspace in File Browser</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
@ -527,6 +527,13 @@ static void mainWindow_settings_buttonCustomNewFileDateFormat_clicked(GtkComboBo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void mainWindow_settings_buttonOpenWorkspaceFolder_clicked(GtkComboBox *widget, gpointer user_data)
|
||||||
|
{
|
||||||
|
struct mainWindow *mainWindow = (struct mainWindow *)user_data;
|
||||||
|
|
||||||
|
mainWindow_openExternalEditor(mainWindow->currentWorkspaceUrl);
|
||||||
|
}
|
||||||
|
|
||||||
const gchar *newDateFormats[] = {"%d.%m.%Y %H:%M",
|
const gchar *newDateFormats[] = {"%d.%m.%Y %H:%M",
|
||||||
"%Y-%m-%d %H:%M",
|
"%Y-%m-%d %H:%M",
|
||||||
NULL};
|
NULL};
|
||||||
@ -605,6 +612,11 @@ static void mainWindow_configure_settings_dialog(struct mainWindow *mainWindow)
|
|||||||
(GCallback) mainWindow_settings_buttonCustomNewFileDateFormat_clicked,
|
(GCallback) mainWindow_settings_buttonCustomNewFileDateFormat_clicked,
|
||||||
mainWindow);
|
mainWindow);
|
||||||
|
|
||||||
|
g_signal_connect(mainWindow->settingsDialog.buttonOpenWorkspaceFolder,
|
||||||
|
"clicked",
|
||||||
|
(GCallback) mainWindow_settings_buttonOpenWorkspaceFolder_clicked,
|
||||||
|
mainWindow);
|
||||||
|
|
||||||
g_signal_connect(mainWindow->settingsDialog.settingsDialog,
|
g_signal_connect(mainWindow->settingsDialog.settingsDialog,
|
||||||
"delete-event",
|
"delete-event",
|
||||||
(GCallback) mainWindow_settings_delete_event,
|
(GCallback) mainWindow_settings_delete_event,
|
||||||
@ -664,6 +676,7 @@ struct mainWindow *mainWindow_new()
|
|||||||
mainWindow->settingsDialog.stackNewDateFormat = GTK_WIDGET(gtk_builder_get_object(builder, "stackNewDateFormat"));
|
mainWindow->settingsDialog.stackNewDateFormat = GTK_WIDGET(gtk_builder_get_object(builder, "stackNewDateFormat"));
|
||||||
mainWindow->settingsDialog.entryNewDateFormat = GTK_WIDGET(gtk_builder_get_object(builder, "entryNewDateFormat"));
|
mainWindow->settingsDialog.entryNewDateFormat = GTK_WIDGET(gtk_builder_get_object(builder, "entryNewDateFormat"));
|
||||||
mainWindow->settingsDialog.buttonCustomNewFileDateFormat = GTK_WIDGET(gtk_builder_get_object(builder, "buttonCustomNewFileDateFormat"));
|
mainWindow->settingsDialog.buttonCustomNewFileDateFormat = GTK_WIDGET(gtk_builder_get_object(builder, "buttonCustomNewFileDateFormat"));
|
||||||
|
mainWindow->settingsDialog.buttonOpenWorkspaceFolder = GTK_WIDGET(gtk_builder_get_object(builder, "buttonOpenWorkspaceFolder"));
|
||||||
|
|
||||||
mainWindow->filterSettings.time_start = 0;
|
mainWindow->filterSettings.time_start = 0;
|
||||||
mainWindow->filterSettings.time_end = -1;
|
mainWindow->filterSettings.time_end = -1;
|
||||||
@ -711,6 +724,8 @@ void mainWindow_set_meta_information(struct mainWindow *mainWindow,
|
|||||||
mainWindow->time_latest = time_latest;
|
mainWindow->time_latest = time_latest;
|
||||||
mainWindow->filterSettings.hide_all = hide_all;
|
mainWindow->filterSettings.hide_all = hide_all;
|
||||||
gtk_widget_set_sensitive(mainWindow->mainPane, !hide_all);
|
gtk_widget_set_sensitive(mainWindow->mainPane, !hide_all);
|
||||||
|
gtk_widget_set_sensitive(mainWindow->settingsDialog.buttonOpenWorkspaceFolder,
|
||||||
|
!hide_all);
|
||||||
mainWindow_clearSearch(NULL, mainWindow);
|
mainWindow_clearSearch(NULL, mainWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,6 +93,7 @@ struct mainWindow {
|
|||||||
GtkWidget *stackNewDateFormat;
|
GtkWidget *stackNewDateFormat;
|
||||||
GtkWidget *comboNewDateFormat;
|
GtkWidget *comboNewDateFormat;
|
||||||
GtkWidget *buttonCustomNewFileDateFormat;
|
GtkWidget *buttonCustomNewFileDateFormat;
|
||||||
|
GtkWidget *buttonOpenWorkspaceFolder;
|
||||||
GtkWidget *entryNewDateFormat;
|
GtkWidget *entryNewDateFormat;
|
||||||
} settingsDialog;
|
} settingsDialog;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user