ditch the gnome titlebar (for now) as it doesn't work properly for me ;(

This commit is contained in:
Vivianne 2022-03-22 23:49:59 -07:00
parent 35b69747e8
commit 64ba90c802
4 changed files with 647 additions and 612 deletions

View File

@ -3,7 +3,6 @@
<interface> <interface>
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<template class="DeskcandyDesktopWindow" parent="GtkWindow"> <template class="DeskcandyDesktopWindow" parent="GtkWindow">
<property name="visible">True</property>
<property name="sensitive">False</property> <property name="sensitive">False</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="resizable">False</property> <property name="resizable">False</property>

View File

@ -23,19 +23,21 @@ namespace Deskcandy {
} }
this.socket = new Gtk.Socket(); this.socket = new Gtk.Socket();
this.socket.set_visible(true);
this.add(this.socket); this.add(this.socket);
this.socket.visible = true;
this.visible = true;
try { try {
this.proc = candy.launch((uint)this.socket.get_id(), "abstractile"); this.proc = candy.launch((uint)this.socket.get_id(), "unknownpleasures");
} catch (Error e) { } catch (Error e) {
error(e.message); error(e.message);
} }
} }
private void on_initialized(BaseCandy[] candies) { private void on_initialized(BaseCandy[] candies) {
this.present(); this.present();
//this.refresh_socket(candy); this.refresh_socket(candies[0]);
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -9,11 +9,11 @@ namespace Deskcandy {
[GtkChild] [GtkChild]
private unowned Gtk.MenuButton open_menu_button; private unowned Gtk.MenuButton open_menu_button;
[GtkChild] [GtkChild]
private unowned Gtk.Box preview; private unowned Gtk.Bin preview;
[GtkChild]
private unowned Gtk.HeaderBar headerbar;
[GtkChild] [GtkChild]
private unowned Gtk.Stack main_stack; private unowned Gtk.Stack main_stack;
[GtkChild]
private unowned Gtk.Label candy_status;
[GtkChild] [GtkChild]
private unowned Gtk.ListStore screensavers_liststore; private unowned Gtk.ListStore screensavers_liststore;
@ -64,10 +64,8 @@ namespace Deskcandy {
} }
this.socket = new Gtk.Socket(); this.socket = new Gtk.Socket();
this.socket.expand = true;
this.preview.add(this.socket);
this.socket.visible = true; this.socket.visible = true;
this.socket.realize(); this.preview.add(this.socket);
try { try {
this.proc = candy.launch((uint)this.socket.get_id(), name); this.proc = candy.launch((uint)this.socket.get_id(), name);
@ -120,7 +118,7 @@ namespace Deskcandy {
private void on_notify_enabled(Object o, GLib.ParamSpec param) { private void on_notify_enabled(Object o, GLib.ParamSpec param) {
var val = ((Application)o).enabled; var val = ((Application)o).enabled;
this.headerbar.subtitle = val ? "started" : "stopped"; this.candy_status.label = val ? "Candy started" : "Candy stopped";
} }
} }
} }