[gnome-control-center] search: Make search locations dialog adaptive
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] search: Make search locations dialog adaptive
- Date: Fri, 26 Jul 2019 01:28:13 +0000 (UTC)
commit 53ba6dcd2e5f1b510d345773a88ccf97ce0023d2
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Wed Jul 17 18:40:39 2019 +0530
search: Make search locations dialog adaptive
panels/search/cc-search-locations-dialog.c | 4 ++--
panels/search/cc-search-locations-dialog.h | 6 +++++-
panels/search/search-locations-dialog.ui | 4 ++--
3 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/panels/search/cc-search-locations-dialog.c b/panels/search/cc-search-locations-dialog.c
index 37e3afcc7..c8648ba23 100644
--- a/panels/search/cc-search-locations-dialog.c
+++ b/panels/search/cc-search-locations-dialog.c
@@ -44,7 +44,7 @@ typedef struct {
} Place;
struct _CcSearchLocationsDialog {
- GtkDialog parent;
+ HdyDialog parent;
GtkWidget *places_list;
GtkWidget *bookmarks_list;
@@ -56,7 +56,7 @@ struct _CcSearchLocationsDialogClass {
GtkDialogClass parent_class;
};
-G_DEFINE_TYPE (CcSearchLocationsDialog, cc_search_locations_dialog, GTK_TYPE_DIALOG);
+G_DEFINE_TYPE (CcSearchLocationsDialog, cc_search_locations_dialog, HDY_TYPE_DIALOG)
static void
cc_search_locations_dialog_finalize (GObject *object)
diff --git a/panels/search/cc-search-locations-dialog.h b/panels/search/cc-search-locations-dialog.h
index 912f2f082..0110dff8c 100644
--- a/panels/search/cc-search-locations-dialog.h
+++ b/panels/search/cc-search-locations-dialog.h
@@ -20,10 +20,14 @@
#pragma once
+#define HANDY_USE_UNSTABLE_API
+#include <handy.h>
+#undef HANDY_USE_UNSTABLE_API
+
#include "cc-search-panel.h"
#define CC_SEARCH_LOCATIONS_DIALOG_TYPE (cc_search_locations_dialog_get_type ())
-G_DECLARE_FINAL_TYPE (CcSearchLocationsDialog, cc_search_locations_dialog, CC, SEARCH_LOCATIONS_DIALOG,
GtkDialog)
+G_DECLARE_FINAL_TYPE (CcSearchLocationsDialog, cc_search_locations_dialog, CC, SEARCH_LOCATIONS_DIALOG,
HdyDialog)
CcSearchLocationsDialog *cc_search_locations_dialog_new (CcSearchPanel *panel);
diff --git a/panels/search/search-locations-dialog.ui b/panels/search/search-locations-dialog.ui
index f45df605d..fb48ea641 100644
--- a/panels/search/search-locations-dialog.ui
+++ b/panels/search/search-locations-dialog.ui
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <template class="CcSearchLocationsDialog" parent="GtkDialog">
+ <template class="CcSearchLocationsDialog" parent="HdyDialog">
<property name="can_focus">False</property>
<property name="default_height">400</property>
- <property name="default_width">400</property>
+ <property name="default_width">360</property>
<property name="modal">True</property>
<property name="title" translatable="yes">Search Locations</property>
<property name="type_hint">dialog</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]