Browse Source

attempt to detach panels to new window

libpanel_detach
Alexandros Theodotou 6 months ago
parent
commit
56370119f9
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 2
      inc/actions/actions.h
  2. 15
      resources/ui/view_toolbar.ui
  3. 19
      src/actions/actions.c
  4. 1
      src/zrythm_app.c

2
inc/actions/actions.h

@ -234,6 +234,8 @@ activate_fullscreen ( @@ -234,6 +234,8 @@ activate_fullscreen (
GVariant * variant,
gpointer user_data);
COLD DECLARE_SIMPLE (activate_new_workspace_window);
COLD DECLARE_SIMPLE (activate_news);
COLD DECLARE_SIMPLE (activate_manual);
COLD DECLARE_SIMPLE (activate_chat);

15
resources/ui/view_toolbar.ui

@ -61,5 +61,20 @@ @@ -61,5 +61,20 @@
</child>
</object>
</child>
<child>
<object class="GtkSeparator">
<style>
<class name="spacer"/>
</style>
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="GtkButton" id="new_workspace_window_btn">
<property name="icon-name">gnome-icon-library-window-symbolic</property>
<property name="action-name">app.new-workspace-window</property>
<property name="tooltip-text" translatable="yes">New workspace window</property>
</object>
</child>
</template>
</interface>

19
src/actions/actions.c

@ -115,6 +115,7 @@ @@ -115,6 +115,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <libpanel.h>
static GtkWindow * file_browser_window = NULL;
@ -1380,6 +1381,24 @@ DEFINE_SIMPLE (activate_fullscreen) @@ -1380,6 +1381,24 @@ DEFINE_SIMPLE (activate_fullscreen)
}
}
DEFINE_SIMPLE (activate_new_workspace_window)
{
GtkWindow * window = GTK_WINDOW (gtk_window_new ());
PanelDock * dock = PANEL_DOCK (panel_dock_new ());
/*PanelGrid * grid = PANEL_GRID (panel_grid_new ());*/
PanelPaned * paned = PANEL_PANED (panel_paned_new ());
PanelFrame * frame = PANEL_FRAME (panel_frame_new ());
PanelWidget * pw = PANEL_WIDGET (panel_widget_new ());
panel_widget_set_child (pw, gtk_label_new ("test"));
panel_frame_add (frame, pw);
/*panel_grid_add (grid, pw);*/
panel_paned_append (paned, GTK_WIDGET (frame));
/*panel_paned_append (paned, gtk_label_new ("test2"));*/
gtk_widget_set_parent (GTK_WIDGET (paned), GTK_WIDGET (dock));
gtk_window_set_child (window, GTK_WIDGET (dock));
gtk_window_present (window);
}
/**
* All purpose menuitem callback for binding MIDI
* CC to a port.

1
src/zrythm_app.c

@ -1806,6 +1806,7 @@ zrythm_app_init (ZrythmApp * self) @@ -1806,6 +1806,7 @@ zrythm_app_init (ZrythmApp * self)
{ "load_project", on_load_project },
{ "about", activate_about },
{ "fullscreen", activate_fullscreen },
{ "new-workspace-window", activate_new_workspace_window },
{ "chat", activate_chat },
{ "manual", activate_manual },
{ "news", activate_news },

Loading…
Cancel
Save