~alextee/zrythm

56370119f9dda46cbd17b71511ec9f5fad0c8145 — Alexandros Theodotou 1 year, 6 months ago e37fd66 libpanel_detach
attempt to detach panels to new window
4 files changed, 37 insertions(+), 0 deletions(-)

M inc/actions/actions.h
M resources/ui/view_toolbar.ui
M src/actions/actions.c
M src/zrythm_app.c
M inc/actions/actions.h => inc/actions/actions.h +2 -0
@@ 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);

M resources/ui/view_toolbar.ui => resources/ui/view_toolbar.ui +15 -0
@@ 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>

M src/actions/actions.c => src/actions/actions.c +19 -0
@@ 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)
    }
}

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.

M src/zrythm_app.c => src/zrythm_app.c +1 -0
@@ 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               },