Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9eb54a2

Browse filesBrowse files
danirabbitcassidyjamesJeremy Wootten
authored
MainWindow: Subclass Hdy.Window (elementary#869)
* MainWindow: Subclass Hdy.Window * Update main.yml * Release Action: Use odin branch HdyWindow is Odin-only. Co-authored-by: Cassidy James Blaede <cassidy@elementary.io> Co-authored-by: Jeremy Wootten <jeremy@elementaryos.org>
1 parent 0812f1c commit 9eb54a2
Copy full SHA for 9eb54a2

File tree

Expand file treeCollapse file tree

6 files changed

+14
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

6 files changed

+14
-6
lines changed
Open diff view settings
Collapse file

‎.github/workflows/main.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/main.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Install Dependencies
1616
run: |
1717
apt update
18-
apt install -y exuberant-ctags libeditorconfig-dev libgail-3-dev libgee-0.8-dev libgit2-glib-1.0-dev libgranite-dev libgtk-3-dev libgtksourceview-4-dev libgtkspell3-3-dev libpeas-dev libsoup2.4-dev libvala-dev libvte-2.91-dev libzeitgeist-2.0-dev meson valac
18+
apt install -y exuberant-ctags libeditorconfig-dev libgail-3-dev libgee-0.8-dev libgit2-glib-1.0-dev libgranite-dev libgtk-3-dev libgtksourceview-4-dev libgtkspell3-3-dev libhandy-1-dev libpeas-dev libsoup2.4-dev libvala-dev libvte-2.91-dev libzeitgeist-2.0-dev meson valac
1919
- name: Build
2020
env:
2121
DESTDIR: out
Collapse file

‎.github/workflows/release.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/release.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ jobs:
1616
GIT_USER_NAME: "elementaryBot"
1717
GIT_USER_EMAIL: "builds@elementary.io"
1818
with:
19-
release_branch: 'juno'
19+
release_branch: 'odin'
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ You'll need the following dependencies:
1414
* libgtksourceview-4-dev
1515
* libgtkspell3-3-dev
1616
* libgranite-dev >= 5.2.0
17+
* libhandy-1-dev >= 0.90.0
1718
* libpeas-dev
1819
* libsoup2.4-dev
1920
* libvala-0.34-dev (or higher)
Collapse file

‎meson.build‎

Copy file name to clipboardExpand all lines: meson.build
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ gio_unix_dep = dependency('gio-unix-2.0', version: '>=2.20')
2626
gee_dep = dependency('gee-0.8', version: '>=0.8.5')
2727
gtk_dep = dependency('gtk+-3.0', version: '>=3.6.0')
2828
granite_dep = dependency('granite', version: '>=5.2.0')
29+
handy_dep = dependency('libhandy-1', version: '>=0.90.0')
2930
gtksourceview_dep = dependency('gtksourceview-4')
3031
peas_dep = dependency('libpeas-1.0')
3132
peasgtk_dep = dependency('libpeas-gtk-1.0')
@@ -45,6 +46,7 @@ dependencies = [
4546
gee_dep,
4647
gtk_dep,
4748
granite_dep,
49+
handy_dep,
4850
gtksourceview_dep,
4951
peas_dep,
5052
peasgtk_dep,
Collapse file

‎src/MainWindow.vala‎

Copy file name to clipboardExpand all lines: src/MainWindow.vala
+8-3Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020

2121
namespace Scratch {
22-
public class MainWindow : Gtk.Window {
22+
public class MainWindow : Hdy.Window {
2323
public const int FONT_SIZE_MAX = 72;
2424
public const int FONT_SIZE_MIN = 7;
2525
private const uint MAX_SEARCH_TEXT_LENGTH = 255;
@@ -176,6 +176,8 @@ namespace Scratch {
176176
var provider = new Gtk.CssProvider ();
177177
provider.load_from_resource ("io/elementary/code/Application.css");
178178
Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
179+
180+
Hdy.init ();
179181
}
180182

181183
construct {
@@ -288,7 +290,6 @@ namespace Scratch {
288290
private void init_layout () {
289291
toolbar = new Scratch.Widgets.HeaderBar ();
290292
toolbar.title = title;
291-
set_titlebar (toolbar);
292293

293294
// SearchBar
294295
search_bar = new Scratch.Widgets.SearchBar (this);
@@ -381,7 +382,11 @@ namespace Scratch {
381382
vp.pack1 (hp1, true, false);
382383
vp.pack2 (bottombar, false, false);
383384

384-
add (vp);
385+
var grid = new Gtk.Grid ();
386+
grid.attach (toolbar, 0, 0);
387+
grid.attach (vp, 0, 1);
388+
389+
add (grid);
385390

386391
search_revealer.set_reveal_child (false);
387392

Collapse file

‎src/Widgets/HeaderBar.vala‎

Copy file name to clipboardExpand all lines: src/Widgets/HeaderBar.vala
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121

2222
namespace Scratch.Widgets {
23-
public class HeaderBar : Gtk.HeaderBar {
23+
public class HeaderBar : Hdy.HeaderBar {
2424
public Gtk.Menu share_menu;
2525
public Gtk.MenuButton share_app_menu;
2626
public Gtk.MenuButton app_menu;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.