diff --git a/shell/explorer/README.MD b/shell/explorer/README.MD
index df77f7f..f585062 100644
--- a/shell/explorer/README.MD
+++ b/shell/explorer/README.MD
@@ -1,4 +1,4 @@
# explorer
This directory contains the source code for *Explorer*.
-
+
diff --git a/shell/explorer/src/application.c b/shell/explorer/src/application.c
index 35cebe2..01d99ab 100644
--- a/shell/explorer/src/application.c
+++ b/shell/explorer/src/application.c
@@ -261,6 +261,38 @@ static void wintc_explorer_application_startup(
(G_APPLICATION_CLASS(wintc_explorer_application_parent_class))
->startup(application);
+ // Install styles
+ //
+ GtkCssProvider* css_provider = gtk_css_provider_new();
+ GtkCssProvider* css_provider_p = gtk_css_provider_new();
+
+ gtk_css_provider_load_from_resource(
+ css_provider,
+ "/uk/oddmatics/wintc/explorer/appstyles.css"
+ );
+ gtk_css_provider_load_from_resource(
+ css_provider_p,
+ "/uk/oddmatics/wintc/explorer/appstyles_p.css"
+ );
+
+ gtk_style_context_add_provider_for_screen(
+ gdk_screen_get_default(),
+ GTK_STYLE_PROVIDER(css_provider),
+ GTK_STYLE_PROVIDER_PRIORITY_FALLBACK
+ );
+ gtk_style_context_add_provider_for_screen(
+ gdk_screen_get_default(),
+ GTK_STYLE_PROVIDER(css_provider_p),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
+ );
+
+ // Install icon resource path
+ //
+ gtk_icon_theme_add_resource_path(
+ gtk_icon_theme_get_default(),
+ "/uk/oddmatics/wintc/explorer"
+ );
+
// Init comctl
//
wintc_ctl_install_default_styles();
diff --git a/shell/explorer/src/res/adrbar.ui b/shell/explorer/src/res/adrbar.ui
index 8a7dbc4..1f9dff8 100644
--- a/shell/explorer/src/res/adrbar.ui
+++ b/shell/explorer/src/res/adrbar.ui
@@ -53,13 +53,45 @@
True
False
False
+
-
+
+
diff --git a/shell/explorer/src/res/appstyles.css b/shell/explorer/src/res/appstyles.css
new file mode 100644
index 0000000..e74a8be
--- /dev/null
+++ b/shell/explorer/src/res/appstyles.css
@@ -0,0 +1,5 @@
+.wintc-explorer-go label
+{
+ margin-left: 4px;
+ margin-right: 6px;
+}
diff --git a/shell/explorer/src/res/appstyles_p.css b/shell/explorer/src/res/appstyles_p.css
new file mode 100644
index 0000000..f5d800f
--- /dev/null
+++ b/shell/explorer/src/res/appstyles_p.css
@@ -0,0 +1,11 @@
+.wintc-explorer-go
+{
+ border-bottom-width: 1px;
+ border-top-width: 2px;
+}
+
+.wintc-explorer-throbber
+{
+ background: #FFFFFF;
+ padding: 0px 4px;
+}
diff --git a/shell/explorer/src/res/explorer.ui b/shell/explorer/src/res/explorer.ui
index d17332b..464097f 100644
--- a/shell/explorer/src/res/explorer.ui
+++ b/shell/explorer/src/res/explorer.ui
@@ -516,9 +516,29 @@
-
+
False
diff --git a/shell/explorer/src/res/favside.ui b/shell/explorer/src/res/favside.ui
index 3eb041a..496f830 100644
--- a/shell/explorer/src/res/favside.ui
+++ b/shell/explorer/src/res/favside.ui
@@ -26,11 +26,22 @@
-
+
True
True
True
- X
+
+
+
+ True
+ False
+ window-close-symbolic
+
+
+
+
False
diff --git a/shell/explorer/src/res/fldrside.ui b/shell/explorer/src/res/fldrside.ui
index 9d5ae77..e0af245 100644
--- a/shell/explorer/src/res/fldrside.ui
+++ b/shell/explorer/src/res/fldrside.ui
@@ -26,11 +26,22 @@
-
+
True
True
True
- X
+
+
+
+ True
+ False
+ window-close-symbolic
+
+
+
+
False
diff --git a/shell/explorer/src/res/resources.xml b/shell/explorer/src/res/resources.xml
index fe7e596..9d51319 100644
--- a/shell/explorer/src/res/resources.xml
+++ b/shell/explorer/src/res/resources.xml
@@ -5,6 +5,10 @@
flag26.png
flag38.png
+
+ wintc-go-button.png
+ wintc-go-button-hot.png
+
favside.ui
fldrside.ui
@@ -13,5 +17,9 @@
adrbar.ui
explorer.ui
+
+
+ appstyles.css
+ appstyles_p.css
diff --git a/shell/explorer/src/res/srchside.ui b/shell/explorer/src/res/srchside.ui
index 78cb779..784921a 100644
--- a/shell/explorer/src/res/srchside.ui
+++ b/shell/explorer/src/res/srchside.ui
@@ -26,17 +26,23 @@
-
+
True
True
True
- X
+
+
+
+ True
+ False
+ window-close-symbolic
+
+
+
+
-
- False
- False
- 1
-
diff --git a/shell/explorer/src/res/wintc-go-button-hot.png b/shell/explorer/src/res/wintc-go-button-hot.png
new file mode 100644
index 0000000..b23ef2f
Binary files /dev/null and b/shell/explorer/src/res/wintc-go-button-hot.png differ
diff --git a/shell/explorer/src/res/wintc-go-button.png b/shell/explorer/src/res/wintc-go-button.png
new file mode 100644
index 0000000..c190430
Binary files /dev/null and b/shell/explorer/src/res/wintc-go-button.png differ
diff --git a/shell/explorer/src/sidebars/favside.c b/shell/explorer/src/sidebars/favside.c
index d76229e..3999d06 100644
--- a/shell/explorer/src/sidebars/favside.c
+++ b/shell/explorer/src/sidebars/favside.c
@@ -18,6 +18,11 @@ static void wintc_exp_favorites_sidebar_constructed(
GObject* object
);
+static void on_button_close_clicked(
+ GtkWidget* self,
+ gpointer user_data
+);
+
//
// GTK OOP CLASS/INSTANCE DEFINITIONS
//
@@ -60,12 +65,23 @@ static void wintc_exp_favorites_sidebar_init(
"/uk/oddmatics/wintc/explorer/favside.ui"
);
- sidebar->root_widget =
- GTK_WIDGET(
- g_object_ref(
- gtk_builder_get_object(builder, "main-box")
- )
- );
+ GtkWidget* button_close = NULL;
+
+ wintc_builder_get_objects(
+ builder,
+ "button-close", &button_close,
+ "main-box", &(sidebar->root_widget),
+ NULL
+ );
+
+ g_object_ref(sidebar->root_widget);
+
+ g_signal_connect(
+ button_close,
+ "clicked",
+ G_CALLBACK(on_button_close_clicked),
+ self
+ );
g_object_unref(builder);
}
@@ -92,3 +108,20 @@ WinTCExplorerSidebar* wintc_exp_favorites_sidebar_new(
)
);
}
+
+//
+// CALLBACKS
+//
+static void on_button_close_clicked(
+ WINTC_UNUSED(GtkWidget* self),
+ gpointer user_data
+)
+{
+ WinTCExplorerSidebar* sidebar =
+ WINTC_EXPLORER_SIDEBAR(user_data);
+
+ wintc_explorer_window_toggle_sidebar(
+ WINTC_EXPLORER_WINDOW(sidebar->owner_explorer_wnd),
+ WINTC_EXPLORER_SIDEBAR_ID_FAVORITES
+ );
+}
diff --git a/shell/explorer/src/sidebars/fldrside.c b/shell/explorer/src/sidebars/fldrside.c
index 5b473a5..b6e4d23 100644
--- a/shell/explorer/src/sidebars/fldrside.c
+++ b/shell/explorer/src/sidebars/fldrside.c
@@ -22,6 +22,10 @@ static void wintc_exp_folders_sidebar_dispose(
GObject* object
);
+static void on_button_close_clicked(
+ GtkWidget* self,
+ gpointer user_data
+);
static void on_explorer_window_mode_changed(
WinTCExplorerWindow* self,
gpointer user_data
@@ -78,17 +82,25 @@ static void wintc_exp_folders_sidebar_init(
"/uk/oddmatics/wintc/explorer/fldrside.ui"
);
- sidebar->root_widget =
- GTK_WIDGET(
- gtk_builder_get_object(builder, "main-box")
- );
- self->tree_view =
- GTK_WIDGET(
- gtk_builder_get_object(builder, "tree-view")
- );
+ GtkWidget* button_close = NULL;
+
+ wintc_builder_get_objects(
+ builder,
+ "button-close", &button_close,
+ "main-box", &(sidebar->root_widget),
+ "tree-view", &(self->tree_view),
+ NULL
+ );
g_object_ref(sidebar->root_widget);
+ g_signal_connect(
+ button_close,
+ "clicked",
+ G_CALLBACK(on_button_close_clicked),
+ self
+ );
+
g_object_unref(builder);
}
@@ -168,6 +180,20 @@ WinTCExplorerSidebar* wintc_exp_folders_sidebar_new(
//
// CALLBACKS
//
+static void on_button_close_clicked(
+ WINTC_UNUSED(GtkWidget* self),
+ gpointer user_data
+)
+{
+ WinTCExplorerSidebar* sidebar =
+ WINTC_EXPLORER_SIDEBAR(user_data);
+
+ wintc_explorer_window_toggle_sidebar(
+ WINTC_EXPLORER_WINDOW(sidebar->owner_explorer_wnd),
+ WINTC_EXPLORER_SIDEBAR_ID_FOLDERS
+ );
+}
+
static void on_explorer_window_mode_changed(
WinTCExplorerWindow* self,
gpointer user_data
diff --git a/shell/explorer/src/sidebars/srchside.c b/shell/explorer/src/sidebars/srchside.c
index 80ef62f..64412e1 100644
--- a/shell/explorer/src/sidebars/srchside.c
+++ b/shell/explorer/src/sidebars/srchside.c
@@ -18,6 +18,11 @@ static void wintc_exp_search_sidebar_constructed(
GObject* object
);
+static void on_button_close_clicked(
+ GtkWidget* self,
+ gpointer user_data
+);
+
//
// GTK OOP CLASS/INSTANCE DEFINITIONS
//
@@ -60,12 +65,23 @@ static void wintc_exp_search_sidebar_init(
"/uk/oddmatics/wintc/explorer/srchside.ui"
);
- sidebar->root_widget =
- GTK_WIDGET(
- g_object_ref(
- gtk_builder_get_object(builder, "main-box")
- )
- );
+ GtkWidget* button_close = NULL;
+
+ wintc_builder_get_objects(
+ builder,
+ "button-close", &button_close,
+ "main-box", &(sidebar->root_widget),
+ NULL
+ );
+
+ g_object_ref(sidebar->root_widget);
+
+ g_signal_connect(
+ button_close,
+ "clicked",
+ G_CALLBACK(on_button_close_clicked),
+ self
+ );
g_object_unref(builder);
}
@@ -92,3 +108,20 @@ WinTCExplorerSidebar* wintc_exp_search_sidebar_new(
)
);
}
+
+//
+// CALLBACKS
+//
+static void on_button_close_clicked(
+ WINTC_UNUSED(GtkWidget* self),
+ gpointer user_data
+)
+{
+ WinTCExplorerSidebar* sidebar =
+ WINTC_EXPLORER_SIDEBAR(user_data);
+
+ wintc_explorer_window_toggle_sidebar(
+ WINTC_EXPLORER_WINDOW(sidebar->owner_explorer_wnd),
+ WINTC_EXPLORER_SIDEBAR_ID_SEARCH
+ );
+}
diff --git a/shell/explorer/src/window.c b/shell/explorer/src/window.c
index 9703b15..9338012 100644
--- a/shell/explorer/src/window.c
+++ b/shell/explorer/src/window.c
@@ -1024,6 +1024,10 @@ static void switch_mode_to(
wnd->iconview_browser
);
+ gtk_widget_grab_focus(
+ wnd->iconview_browser
+ );
+
break;
case WINTC_EXPLORER_WINDOW_MODE_INTERNET:
@@ -1065,6 +1069,10 @@ static void switch_mode_to(
wnd->webkit_browser
);
+ gtk_widget_grab_focus(
+ wnd->webkit_browser
+ );
+
break;
default:
diff --git a/themes/build-common/gtk-3.0-base/common/menu.scss b/themes/build-common/gtk-3.0-base/common/menu.scss
index 86e9ad9..ee54ee9 100644
--- a/themes/build-common/gtk-3.0-base/common/menu.scss
+++ b/themes/build-common/gtk-3.0-base/common/menu.scss
@@ -26,6 +26,11 @@ menubar,
-GtkWidget-window-dragging: true;
+ &:first-child
+ {
+ border-left-width: 0px;
+ }
+
box.vertical > &:last-child
{
border-bottom-style: none;
diff --git a/themes/build-common/gtk-3.0-base/common/toolbar.scss b/themes/build-common/gtk-3.0-base/common/toolbar.scss
index 6121563..1ed71de 100644
--- a/themes/build-common/gtk-3.0-base/common/toolbar.scss
+++ b/themes/build-common/gtk-3.0-base/common/toolbar.scss
@@ -22,6 +22,11 @@ toolbar
padding: 4px 3px 3px 4px;
+ &:first-child
+ {
+ border-left-width: 0px;
+ }
+
// RORY: This is an attempt to avoid weird borders on frames... see
// issue #334
//
diff --git a/themes/embedded/Resources/toolbar_border.png b/themes/embedded/Resources/toolbar_border.png
index 91d17ef..56dde15 100644
Binary files a/themes/embedded/Resources/toolbar_border.png and b/themes/embedded/Resources/toolbar_border.png differ
diff --git a/themes/embedded/gtk-3.0/styling/menu.scss b/themes/embedded/gtk-3.0/styling/menu.scss
index fda5768..69be1b5 100644
--- a/themes/embedded/gtk-3.0/styling/menu.scss
+++ b/themes/embedded/gtk-3.0/styling/menu.scss
@@ -20,7 +20,7 @@ $menustrip_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);
diff --git a/themes/embedded/gtk-3.0/styling/toolbar.scss b/themes/embedded/gtk-3.0/styling/toolbar.scss
index 6976980..6c38eda 100644
--- a/themes/embedded/gtk-3.0/styling/toolbar.scss
+++ b/themes/embedded/gtk-3.0/styling/toolbar.scss
@@ -20,7 +20,7 @@ $toolbar_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);
diff --git a/themes/luna/blue/Resources/toolbar_border.png b/themes/luna/blue/Resources/toolbar_border.png
index 2dd1b65..44e24eb 100644
Binary files a/themes/luna/blue/Resources/toolbar_border.png and b/themes/luna/blue/Resources/toolbar_border.png differ
diff --git a/themes/luna/blue/gtk-3.0/styling/menu.scss b/themes/luna/blue/gtk-3.0/styling/menu.scss
index 03361ae..02b8193 100644
--- a/themes/luna/blue/gtk-3.0/styling/menu.scss
+++ b/themes/luna/blue/gtk-3.0/styling/menu.scss
@@ -20,7 +20,7 @@ $menustrip_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);
diff --git a/themes/luna/blue/gtk-3.0/styling/toolbar.scss b/themes/luna/blue/gtk-3.0/styling/toolbar.scss
index be8177d..4316e0e 100644
--- a/themes/luna/blue/gtk-3.0/styling/toolbar.scss
+++ b/themes/luna/blue/gtk-3.0/styling/toolbar.scss
@@ -20,7 +20,7 @@ $toolbar_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);
diff --git a/themes/luna/homestead/Resources/toolbar_border.png b/themes/luna/homestead/Resources/toolbar_border.png
index 2dd1b65..44e24eb 100644
Binary files a/themes/luna/homestead/Resources/toolbar_border.png and b/themes/luna/homestead/Resources/toolbar_border.png differ
diff --git a/themes/luna/homestead/gtk-3.0/styling/menu.scss b/themes/luna/homestead/gtk-3.0/styling/menu.scss
index 79ba03e..40a3f22 100644
--- a/themes/luna/homestead/gtk-3.0/styling/menu.scss
+++ b/themes/luna/homestead/gtk-3.0/styling/menu.scss
@@ -21,7 +21,7 @@ $menustrip_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);
diff --git a/themes/luna/homestead/gtk-3.0/styling/toolbar.scss b/themes/luna/homestead/gtk-3.0/styling/toolbar.scss
index 3721544..3c0ada4 100644
--- a/themes/luna/homestead/gtk-3.0/styling/toolbar.scss
+++ b/themes/luna/homestead/gtk-3.0/styling/toolbar.scss
@@ -21,7 +21,7 @@ $toolbar_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);
diff --git a/themes/luna/metallic/Resources/toolbar_border.png b/themes/luna/metallic/Resources/toolbar_border.png
index 2dd1b65..44e24eb 100644
Binary files a/themes/luna/metallic/Resources/toolbar_border.png and b/themes/luna/metallic/Resources/toolbar_border.png differ
diff --git a/themes/luna/metallic/gtk-3.0/styling/menu.scss b/themes/luna/metallic/gtk-3.0/styling/menu.scss
index dbb9750..34bb228 100644
--- a/themes/luna/metallic/gtk-3.0/styling/menu.scss
+++ b/themes/luna/metallic/gtk-3.0/styling/menu.scss
@@ -20,7 +20,7 @@ $menustrip_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);
diff --git a/themes/luna/metallic/gtk-3.0/styling/toolbar.scss b/themes/luna/metallic/gtk-3.0/styling/toolbar.scss
index 0d0b48f..4ed1952 100644
--- a/themes/luna/metallic/gtk-3.0/styling/toolbar.scss
+++ b/themes/luna/metallic/gtk-3.0/styling/toolbar.scss
@@ -20,7 +20,7 @@ $toolbar_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);
diff --git a/themes/symphony/noir/Resources/toolbar_border.png b/themes/symphony/noir/Resources/toolbar_border.png
index 91d17ef..56dde15 100644
Binary files a/themes/symphony/noir/Resources/toolbar_border.png and b/themes/symphony/noir/Resources/toolbar_border.png differ
diff --git a/themes/symphony/noir/gtk-3.0/styling/menu.scss b/themes/symphony/noir/gtk-3.0/styling/menu.scss
index 3615b9e..e9b2f26 100644
--- a/themes/symphony/noir/gtk-3.0/styling/menu.scss
+++ b/themes/symphony/noir/gtk-3.0/styling/menu.scss
@@ -20,7 +20,7 @@ $menustrip_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);
diff --git a/themes/symphony/noir/gtk-3.0/styling/toolbar.scss b/themes/symphony/noir/gtk-3.0/styling/toolbar.scss
index 50cd1ce..b207dd6 100644
--- a/themes/symphony/noir/gtk-3.0/styling/toolbar.scss
+++ b/themes/symphony/noir/gtk-3.0/styling/toolbar.scss
@@ -20,7 +20,7 @@ $toolbar_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);
diff --git a/themes/symphony/royale/Resources/toolbar_border.png b/themes/symphony/royale/Resources/toolbar_border.png
index 91d17ef..56dde15 100644
Binary files a/themes/symphony/royale/Resources/toolbar_border.png and b/themes/symphony/royale/Resources/toolbar_border.png differ
diff --git a/themes/symphony/royale/gtk-3.0/styling/menu.scss b/themes/symphony/royale/gtk-3.0/styling/menu.scss
index 6ad6833..3c3d6b8 100644
--- a/themes/symphony/royale/gtk-3.0/styling/menu.scss
+++ b/themes/symphony/royale/gtk-3.0/styling/menu.scss
@@ -20,7 +20,7 @@ $menustrip_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);
diff --git a/themes/symphony/royale/gtk-3.0/styling/toolbar.scss b/themes/symphony/royale/gtk-3.0/styling/toolbar.scss
index d55e131..606adab 100644
--- a/themes/symphony/royale/gtk-3.0/styling/toolbar.scss
+++ b/themes/symphony/royale/gtk-3.0/styling/toolbar.scss
@@ -20,7 +20,7 @@ $toolbar_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);
diff --git a/themes/zune/Resources/toolbar_border.png b/themes/zune/Resources/toolbar_border.png
index 91d17ef..56dde15 100644
Binary files a/themes/zune/Resources/toolbar_border.png and b/themes/zune/Resources/toolbar_border.png differ
diff --git a/themes/zune/gtk-3.0/styling/menu.scss b/themes/zune/gtk-3.0/styling/menu.scss
index 235a62f..b0827bf 100644
--- a/themes/zune/gtk-3.0/styling/menu.scss
+++ b/themes/zune/gtk-3.0/styling/menu.scss
@@ -21,7 +21,7 @@ $menustrip_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);
diff --git a/themes/zune/gtk-3.0/styling/toolbar.scss b/themes/zune/gtk-3.0/styling/toolbar.scss
index ff515c1..c41b6db 100644
--- a/themes/zune/gtk-3.0/styling/toolbar.scss
+++ b/themes/zune/gtk-3.0/styling/toolbar.scss
@@ -21,7 +21,7 @@ $toolbar_styles:
0,
0,
2,
- 0,
+ 2,
undefined,
url('../Resources/toolbar_border.png')
);