[gnome-builder] preferences: add parameter to set selection mode
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] preferences: add parameter to set selection mode
- Date: Sun, 18 Sep 2016 03:23:55 +0000 (UTC)
commit c62209d35dd5cee75d7bfe00ea53c46a672b77c8
Author: Christian Hergert <chergert redhat com>
Date: Sat Sep 17 11:42:47 2016 -0700
preferences: add parameter to set selection mode
This allows us to set the selection mode on the GtkListBox which is useful
to land some of the preferences designs such as language settings.
libide/preferences/ide-preferences-perspective.c | 12 +++++++-----
libide/preferences/ide-preferences.c | 13 +++++++------
libide/preferences/ide-preferences.h | 22 ++++++++++++----------
libidemm/src/libide_methods.defs | 1 +
4 files changed, 27 insertions(+), 21 deletions(-)
---
diff --git a/libide/preferences/ide-preferences-perspective.c
b/libide/preferences/ide-preferences-perspective.c
index 657c4ec..8d5a231 100644
--- a/libide/preferences/ide-preferences-perspective.c
+++ b/libide/preferences/ide-preferences-perspective.c
@@ -367,11 +367,12 @@ ide_preferences_perspective_add_group (IdePreferences *preferences,
}
static void
-ide_preferences_perspective_add_list_group (IdePreferences *preferences,
- const gchar *page_name,
- const gchar *group_name,
- const gchar *title,
- gint priority)
+ide_preferences_perspective_add_list_group (IdePreferences *preferences,
+ const gchar *page_name,
+ const gchar *group_name,
+ const gchar *title,
+ GtkSelectionMode mode,
+ gint priority)
{
IdePreferencesPerspective *self = (IdePreferencesPerspective *)preferences;
IdePreferencesGroup *group;
@@ -391,6 +392,7 @@ ide_preferences_perspective_add_list_group (IdePreferences *preferences,
group = g_object_new (IDE_TYPE_PREFERENCES_GROUP,
"is-list", TRUE,
+ "mode", mode,
"name", group_name,
"priority", priority,
"title", title,
diff --git a/libide/preferences/ide-preferences.c b/libide/preferences/ide-preferences.c
index 1d0b122..af9def3 100644
--- a/libide/preferences/ide-preferences.c
+++ b/libide/preferences/ide-preferences.c
@@ -125,17 +125,18 @@ ide_preferences_add_custom (IdePreferences *self,
}
void
-ide_preferences_add_list_group (IdePreferences *self,
- const gchar *page_name,
- const gchar *group_name,
- const gchar *title,
- gint priority)
+ide_preferences_add_list_group (IdePreferences *self,
+ const gchar *page_name,
+ const gchar *group_name,
+ const gchar *title,
+ GtkSelectionMode mode,
+ gint priority)
{
g_return_if_fail (IDE_IS_PREFERENCES (self));
g_return_if_fail (page_name != NULL);
g_return_if_fail (group_name != NULL);
- return IDE_PREFERENCES_GET_IFACE (self)->add_list_group (self, page_name, group_name, title, priority);
+ return IDE_PREFERENCES_GET_IFACE (self)->add_list_group (self, page_name, group_name, title, mode,
priority);
}
guint ide_preferences_add_radio (IdePreferences *self,
diff --git a/libide/preferences/ide-preferences.h b/libide/preferences/ide-preferences.h
index 53a9947..4db8463 100644
--- a/libide/preferences/ide-preferences.h
+++ b/libide/preferences/ide-preferences.h
@@ -43,11 +43,12 @@ struct _IdePreferencesInterface
const gchar *group_name,
const gchar *title,
gint priority);
- void (*add_list_group ) (IdePreferences *self,
- const gchar *page_name,
- const gchar *group_name,
- const gchar *title,
- gint priority);
+ void (*add_list_group) (IdePreferences *self,
+ const gchar *page_name,
+ const gchar *group_name,
+ const gchar *title,
+ GtkSelectionMode mode,
+ gint priority);
guint (*add_radio) (IdePreferences *self,
const gchar *page_name,
const gchar *group_name,
@@ -122,11 +123,12 @@ void ide_preferences_add_group (IdePreferences *self,
const gchar *group_name,
const gchar *title,
gint priority);
-void ide_preferences_add_list_group (IdePreferences *self,
- const gchar *page_name,
- const gchar *group_name,
- const gchar *title,
- gint priority);
+void ide_preferences_add_list_group (IdePreferences *self,
+ const gchar *page_name,
+ const gchar *group_name,
+ const gchar *title,
+ GtkSelectionMode mode,
+ gint priority);
guint ide_preferences_add_radio (IdePreferences *self,
const gchar *page_name,
const gchar *group_name,
diff --git a/libidemm/src/libide_methods.defs b/libidemm/src/libide_methods.defs
index 211dd56..8474b73 100644
--- a/libidemm/src/libide_methods.defs
+++ b/libidemm/src/libide_methods.defs
@@ -3508,6 +3508,7 @@
'("const-gchar*" "page_name")
'("const-gchar*" "group_name")
'("const-gchar*" "title")
+ '("GtkSelectionMode" "mode")
'("gint" "priority")
)
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]