Minor improvements
This commit is contained in:
parent
a6299aa7ac
commit
552b1568e3
@ -494,6 +494,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<object class="GtkWindow" id="settingsDialog">
|
<object class="GtkWindow" id="settingsDialog">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="window_position">center</property>
|
||||||
<property name="destroy_with_parent">True</property>
|
<property name="destroy_with_parent">True</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
@ -543,7 +544,17 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
|
<object class="GtkHeaderBar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="title">Preferences</property>
|
||||||
|
<property name="has_subtitle">False</property>
|
||||||
|
<property name="show_close_button">True</property>
|
||||||
|
<property name="decoration_layout">close:</property>
|
||||||
|
<child>
|
||||||
<placeholder/>
|
<placeholder/>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
</interface>
|
</interface>
|
||||||
|
@ -432,10 +432,12 @@ static void mainWindow_init_to_default(struct mainWindow *mainWindow)
|
|||||||
*/
|
*/
|
||||||
void mainWindow_renderer_set(struct mainWindow *mainWindow, enum renderer_mode state)
|
void mainWindow_renderer_set(struct mainWindow *mainWindow, enum renderer_mode state)
|
||||||
{
|
{
|
||||||
|
if (mainWindow->renderer == state)
|
||||||
|
return;
|
||||||
|
|
||||||
if (state == RENDERER_HTML) {
|
if (state == RENDERER_HTML) {
|
||||||
if (!mainWindow->webkitView) {
|
if (!mainWindow->webkitView) {
|
||||||
mainWindow->webkitView = webkit_web_view_new();
|
mainWindow->webkitView = webkit_web_view_new();
|
||||||
webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(mainWindow->webkitView), "", "");
|
|
||||||
gtk_widget_show(mainWindow->webkitView);
|
gtk_widget_show(mainWindow->webkitView);
|
||||||
|
|
||||||
mainWindow->webkitScrollArea = gtk_scrolled_window_new(NULL, NULL);
|
mainWindow->webkitScrollArea = gtk_scrolled_window_new(NULL, NULL);
|
||||||
@ -464,7 +466,6 @@ static void mainWindow_settings_combo_changed(GtkComboBox *widget, gpointer user
|
|||||||
else if (!strcmp(gtk_combo_box_get_active_id(GTK_COMBO_BOX(mainWindow->settingsDialog.comboDisplayMode)), "html"))
|
else if (!strcmp(gtk_combo_box_get_active_id(GTK_COMBO_BOX(mainWindow->settingsDialog.comboDisplayMode)), "html"))
|
||||||
mainWindow_renderer_set(mainWindow, RENDERER_HTML);
|
mainWindow_renderer_set(mainWindow, RENDERER_HTML);
|
||||||
|
|
||||||
|
|
||||||
mainWindow_entrySelected(NULL, user_data);
|
mainWindow_entrySelected(NULL, user_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -564,6 +565,8 @@ struct mainWindow *mainWindow_new()
|
|||||||
mainWindow->time_earliest = 0;
|
mainWindow->time_earliest = 0;
|
||||||
mainWindow->time_latest = 0;
|
mainWindow->time_latest = 0;
|
||||||
|
|
||||||
|
mainWindow->renderer = RENDERER_NONE;
|
||||||
|
|
||||||
gtk_builder_connect_signals(builder, NULL);
|
gtk_builder_connect_signals(builder, NULL);
|
||||||
|
|
||||||
g_object_unref(G_OBJECT(builder));
|
g_object_unref(G_OBJECT(builder));
|
||||||
|
@ -16,6 +16,7 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum renderer_mode {
|
enum renderer_mode {
|
||||||
|
RENDERER_NONE = -1,
|
||||||
RENDERER_TEXT = 0,
|
RENDERER_TEXT = 0,
|
||||||
RENDERER_BASIC,
|
RENDERER_BASIC,
|
||||||
RENDERER_HTML
|
RENDERER_HTML
|
||||||
|
Loading…
Reference in New Issue
Block a user