Commit 465a5e68 authored by Newbyte's avatar Newbyte
Browse files

Add support for setting default phone application

parent d748dfef
Pipeline #63174 passed with stages
in 10 minutes and 57 seconds
...@@ -62,6 +62,7 @@ struct _CcInfoDefaultAppsPanel ...@@ -62,6 +62,7 @@ struct _CcInfoDefaultAppsPanel
GtkWidget *web_label; GtkWidget *web_label;
GtkWidget *mail_label; GtkWidget *mail_label;
GtkWidget *phone_label;
GtkWidget *calendar_label; GtkWidget *calendar_label;
GtkWidget *music_label; GtkWidget *music_label;
GtkWidget *video_label; GtkWidget *video_label;
...@@ -175,6 +176,7 @@ info_panel_setup_default_app (CcInfoDefaultAppsPanel *self, ...@@ -175,6 +176,7 @@ info_panel_setup_default_app (CcInfoDefaultAppsPanel *self,
static DefaultAppData preferred_app_infos[] = { static DefaultAppData preferred_app_infos[] = {
{ "x-scheme-handler/http", OFFSET (web_label), "text/html;application/xhtml+xml;x-scheme-handler/https" }, { "x-scheme-handler/http", OFFSET (web_label), "text/html;application/xhtml+xml;x-scheme-handler/https" },
{ "x-scheme-handler/mailto", OFFSET (mail_label), NULL }, { "x-scheme-handler/mailto", OFFSET (mail_label), NULL },
{ "x-scheme-handler/tel", OFFSET (phone_label), NULL },
{ "text/calendar", OFFSET (calendar_label), NULL }, { "text/calendar", OFFSET (calendar_label), NULL },
{ "audio/x-vorbis+ogg", OFFSET (music_label), "audio/*" }, { "audio/x-vorbis+ogg", OFFSET (music_label), "audio/*" },
{ "video/x-ogm+ogg", OFFSET (video_label), "video/*" }, { "video/x-ogm+ogg", OFFSET (video_label), "video/*" },
...@@ -201,6 +203,7 @@ cc_info_default_apps_panel_class_init (CcInfoDefaultAppsPanelClass *klass) ...@@ -201,6 +203,7 @@ cc_info_default_apps_panel_class_init (CcInfoDefaultAppsPanelClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/info/cc-info-default-apps-panel.ui"); gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/info/cc-info-default-apps-panel.ui");
gtk_widget_class_bind_template_child (widget_class, CcInfoDefaultAppsPanel, default_apps_grid); gtk_widget_class_bind_template_child (widget_class, CcInfoDefaultAppsPanel, default_apps_grid);
gtk_widget_class_bind_template_child (widget_class, CcInfoDefaultAppsPanel, web_label); gtk_widget_class_bind_template_child (widget_class, CcInfoDefaultAppsPanel, web_label);
gtk_widget_class_bind_template_child (widget_class, CcInfoDefaultAppsPanel, phone_label);
gtk_widget_class_bind_template_child (widget_class, CcInfoDefaultAppsPanel, mail_label); gtk_widget_class_bind_template_child (widget_class, CcInfoDefaultAppsPanel, mail_label);
gtk_widget_class_bind_template_child (widget_class, CcInfoDefaultAppsPanel, calendar_label); gtk_widget_class_bind_template_child (widget_class, CcInfoDefaultAppsPanel, calendar_label);
gtk_widget_class_bind_template_child (widget_class, CcInfoDefaultAppsPanel, music_label); gtk_widget_class_bind_template_child (widget_class, CcInfoDefaultAppsPanel, music_label);
......
...@@ -51,6 +51,22 @@ ...@@ -51,6 +51,22 @@
<property name="left_attach">0</property> <property name="left_attach">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkLabel" id="phone_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">_Phone</property>
<property name="use_underline">True</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="top_attach">2</property>
<property name="left_attach">0</property>
</packing>
</child>
<child> <child>
<object class="GtkLabel" id="calendar_label"> <object class="GtkLabel" id="calendar_label">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -63,7 +79,7 @@ ...@@ -63,7 +79,7 @@
</style> </style>
</object> </object>
<packing> <packing>
<property name="top_attach">2</property> <property name="top_attach">3</property>
<property name="left_attach">0</property> <property name="left_attach">0</property>
</packing> </packing>
</child> </child>
...@@ -79,7 +95,7 @@ ...@@ -79,7 +95,7 @@
</style> </style>
</object> </object>
<packing> <packing>
<property name="top_attach">3</property> <property name="top_attach">4</property>
<property name="left_attach">0</property> <property name="left_attach">0</property>
</packing> </packing>
</child> </child>
...@@ -95,7 +111,7 @@ ...@@ -95,7 +111,7 @@
</style> </style>
</object> </object>
<packing> <packing>
<property name="top_attach">4</property> <property name="top_attach">5</property>
<property name="left_attach">0</property> <property name="left_attach">0</property>
</packing> </packing>
</child> </child>
...@@ -166,7 +182,7 @@ ...@@ -166,7 +182,7 @@
</style> </style>
</object> </object>
<packing> <packing>
<property name="top_attach">5</property> <property name="top_attach">6</property>
<property name="left_attach">0</property> <property name="left_attach">0</property>
</packing> </packing>
</child> </child>
......
...@@ -1562,18 +1562,22 @@ msgid "_Web" ...@@ -1562,18 +1562,22 @@ msgid "_Web"
msgstr "_Web" msgstr "_Web"
#: panels/info/cc-info-default-apps-panel.ui:43 #: panels/info/cc-info-default-apps-panel.ui:43
msgid "_Phone"
msgstr "_Phone"
#: panels/info/cc-info-default-apps-panel.ui:55
msgid "_Mail" msgid "_Mail"
msgstr "_Mail" msgstr "_Mail"
#: panels/info/cc-info-default-apps-panel.ui:59 #: panels/info/cc-info-default-apps-panel.ui:71
msgid "_Calendar" msgid "_Calendar"
msgstr "_Calendar" msgstr "_Calendar"
#: panels/info/cc-info-default-apps-panel.ui:75 #: panels/info/cc-info-default-apps-panel.ui:87
msgid "M_usic" msgid "M_usic"
msgstr "M_usic" msgstr "M_usic"
#: panels/info/cc-info-default-apps-panel.ui:91 #: panels/info/cc-info-default-apps-panel.ui:103
msgid "_Video" msgid "_Video"
msgstr "_Video" msgstr "_Video"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment