[gnome-builder/wip/gtk4-port] libide/gui: move search popover to libide-gui
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] libide/gui: move search popover to libide-gui
- Date: Thu, 14 Apr 2022 00:10:31 +0000 (UTC)
commit 7e3257a89bf220d63bf6c79ca5c526f364ae10af
Author: Christian Hergert <chergert redhat com>
Date: Wed Apr 13 17:10:23 2022 -0700
libide/gui: move search popover to libide-gui
The styling for this lives in gui anyway, and it's intricately tied to
the IdeWorkspace anyway. It should just live separate from libide-search
to make that component less dependency intertwined.
.../ide-search-popover-private.h} | 12 ++----------
src/libide/{search => gui}/ide-search-popover.c | 2 +-
src/libide/{search => gui}/ide-search-popover.ui | 0
src/libide/gui/ide-workspace.c | 1 +
src/libide/gui/libide-gui.gresource.xml | 1 +
src/libide/gui/meson.build | 2 ++
src/libide/search/ide-search-init.c | 3 ---
src/libide/search/libide-search.gresource.xml | 1 -
src/libide/search/libide-search.h | 1 -
src/libide/search/meson.build | 2 --
10 files changed, 7 insertions(+), 18 deletions(-)
---
diff --git a/src/libide/search/ide-search-popover.h b/src/libide/gui/ide-search-popover-private.h
similarity index 83%
rename from src/libide/search/ide-search-popover.h
rename to src/libide/gui/ide-search-popover-private.h
index 8e36ba325..5ee25fbbd 100644
--- a/src/libide/search/ide-search-popover.h
+++ b/src/libide/gui/ide-search-popover-private.h
@@ -1,4 +1,4 @@
-/* ide-search-popover.h
+/* ide-search-popover-private.h
*
* Copyright 2022 Christian Hergert <chergert redhat com>
*
@@ -20,26 +20,18 @@
#pragma once
-#if !defined (IDE_SEARCH_INSIDE) && !defined (IDE_SEARCH_COMPILATION)
-# error "Only <libide-search.h> can be included directly."
-#endif
-
#include <gtk/gtk.h>
#include <libide-core.h>
-
-#include "ide-search-engine.h"
+#include <libide-search.h>
G_BEGIN_DECLS
#define IDE_TYPE_SEARCH_POPOVER (ide_search_popover_get_type())
-IDE_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (IdeSearchPopover, ide_search_popover, IDE, SEARCH_POPOVER, GtkPopover)
-IDE_AVAILABLE_IN_ALL
GtkWidget *ide_search_popover_new (IdeSearchEngine *search_engine);
-IDE_AVAILABLE_IN_ALL
void ide_search_popover_present (IdeSearchPopover *self,
int parent_width,
int parent_height);
diff --git a/src/libide/search/ide-search-popover.c b/src/libide/gui/ide-search-popover.c
similarity index 99%
rename from src/libide/search/ide-search-popover.c
rename to src/libide/gui/ide-search-popover.c
index f333d115c..fa737c13c 100644
--- a/src/libide/search/ide-search-popover.c
+++ b/src/libide/gui/ide-search-popover.c
@@ -22,7 +22,7 @@
#include "config.h"
-#include "ide-search-popover.h"
+#include "ide-search-popover-private.h"
#include "ide-search-resources.h"
struct _IdeSearchPopover
diff --git a/src/libide/search/ide-search-popover.ui b/src/libide/gui/ide-search-popover.ui
similarity index 100%
rename from src/libide/search/ide-search-popover.ui
rename to src/libide/gui/ide-search-popover.ui
diff --git a/src/libide/gui/ide-workspace.c b/src/libide/gui/ide-workspace.c
index b29d3a85a..8e8fac856 100644
--- a/src/libide/gui/ide-workspace.c
+++ b/src/libide/gui/ide-workspace.c
@@ -26,6 +26,7 @@
#include <libide-plugins.h>
#include "ide-gui-global.h"
+#include "ide-search-popover-private.h"
#include "ide-workspace-addin.h"
#include "ide-workspace-private.h"
#include "ide-workbench-private.h"
diff --git a/src/libide/gui/libide-gui.gresource.xml b/src/libide/gui/libide-gui.gresource.xml
index 5fbaf7d5e..295e763b8 100644
--- a/src/libide/gui/libide-gui.gresource.xml
+++ b/src/libide/gui/libide-gui.gresource.xml
@@ -22,6 +22,7 @@
<file preprocess="xml-stripblanks">ide-preferences-window.ui</file>
<file preprocess="xml-stripblanks">ide-primary-workspace.ui</file>
<file preprocess="xml-stripblanks">ide-run-button.ui</file>
+ <file preprocess="xml-stripblanks">ide-search-popover.ui</file>
<file preprocess="xml-stripblanks">ide-style-variant-preview.ui</file>
</gresource>
</gresources>
diff --git a/src/libide/gui/meson.build b/src/libide/gui/meson.build
index 77689b2f3..3dc9822b6 100644
--- a/src/libide/gui/meson.build
+++ b/src/libide/gui/meson.build
@@ -52,6 +52,7 @@ libide_gui_private_headers = [
'ide-preferences-builtin-private.h',
'ide-primary-workspace-private.h',
'ide-recoloring-private.h',
+ 'ide-search-popover-private.h',
'ide-session-private.h',
'ide-style-variant-preview-private.h',
]
@@ -68,6 +69,7 @@ libide_gui_private_sources = [
'ide-preferences-builtin.c',
'ide-primary-workspace-actions.c',
'ide-recoloring.c',
+ 'ide-search-popover.c',
'ide-session.c',
'ide-style-variant-preview.c',
'ide-workspace-actions.c',
diff --git a/src/libide/search/ide-search-init.c b/src/libide/search/ide-search-init.c
index 74cbffbba..ae3f2b0be 100644
--- a/src/libide/search/ide-search-init.c
+++ b/src/libide/search/ide-search-init.c
@@ -22,14 +22,11 @@
#include "config.h"
-#include "ide-search-popover.h"
#include "ide-search-private.h"
#include "ide-search-resources.h"
void
_ide_search_init (void)
{
- g_type_ensure (IDE_TYPE_SEARCH_POPOVER);
-
g_resources_register (ide_search_get_resource ());
}
diff --git a/src/libide/search/libide-search.gresource.xml b/src/libide/search/libide-search.gresource.xml
index baf08e378..572404cf2 100644
--- a/src/libide/search/libide-search.gresource.xml
+++ b/src/libide/search/libide-search.gresource.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/libide-search">
- <file preprocess="xml-stripblanks">ide-search-popover.ui</file>
</gresource>
</gresources>
diff --git a/src/libide/search/libide-search.h b/src/libide/search/libide-search.h
index f7168f90d..23d9b11b3 100644
--- a/src/libide/search/libide-search.h
+++ b/src/libide/search/libide-search.h
@@ -31,7 +31,6 @@
# include "ide-fuzzy-mutable-index.h"
# include "ide-pattern-spec.h"
# include "ide-search-engine.h"
-# include "ide-search-popover.h"
# include "ide-search-provider.h"
# include "ide-search-reducer.h"
# include "ide-search-result.h"
diff --git a/src/libide/search/meson.build b/src/libide/search/meson.build
index a7a708904..551701aaf 100644
--- a/src/libide/search/meson.build
+++ b/src/libide/search/meson.build
@@ -14,7 +14,6 @@ libide_search_public_headers = [
'ide-fuzzy-mutable-index.h',
'ide-pattern-spec.h',
'ide-search-engine.h',
- 'ide-search-popover.h',
'ide-search-provider.h',
'ide-search-reducer.h',
'ide-search-result.h',
@@ -35,7 +34,6 @@ libide_search_public_sources = [
'ide-fuzzy-mutable-index.c',
'ide-pattern-spec.c',
'ide-search-engine.c',
- 'ide-search-popover.c',
'ide-search-provider.c',
'ide-search-reducer.c',
'ide-search-result.c',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]