git: 53f3134b74bb - main - sysutils/budgie-control-center: add fix to display hostname device
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Oct 2023 20:02:58 UTC
The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=53f3134b74bb18b06b6f2d25dbf2fadfbda004df commit 53f3134b74bb18b06b6f2d25dbf2fadfbda004df Author: Olivier Duchateau <duchateau.olivier@gmail.com> AuthorDate: 2023-10-02 22:47:37 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2023-10-04 19:59:58 +0000 sysutils/budgie-control-center: add fix to display hostname device - Add fix to display hostname device (by default it is searched by the 'org.freedesktop.hostname1' service. It comes from systemd/elogind) - Bump PORTREVISION PR: 274224 MFH: 2023Q4 --- sysutils/budgie-control-center/Makefile | 1 + ...h-panels_info-overview_cc-info-overview-panel.c | 70 ++++++++++++++++++++++ ...-panels_info-overview_cc-info-overview-panel.ui | 24 ++++++++ 3 files changed, 95 insertions(+) diff --git a/sysutils/budgie-control-center/Makefile b/sysutils/budgie-control-center/Makefile index e2e49bba9863..9366403235b6 100644 --- a/sysutils/budgie-control-center/Makefile +++ b/sysutils/budgie-control-center/Makefile @@ -1,5 +1,6 @@ PORTNAME= budgie-control-center DISTVERSION= 1.3.0 +PORTREVISION= 1 CATEGORIES= sysutils budgie MASTER_SITES= BUDGIE diff --git a/sysutils/budgie-control-center/files/patch-panels_info-overview_cc-info-overview-panel.c b/sysutils/budgie-control-center/files/patch-panels_info-overview_cc-info-overview-panel.c new file mode 100644 index 000000000000..0e21eb5c856f --- /dev/null +++ b/sysutils/budgie-control-center/files/patch-panels_info-overview_cc-info-overview-panel.c @@ -0,0 +1,70 @@ +--- panels/info-overview/cc-info-overview-panel.c.orig 2023-08-01 19:09:00 UTC ++++ panels/info-overview/cc-info-overview-panel.c +@@ -40,6 +40,9 @@ + #include <udisks/udisks.h> + #include <gudev/gudev.h> + ++#include <limits.h> ++#include <unistd.h> ++ + #include <gdk/gdk.h> + + #ifdef GDK_WINDOWING_WAYLAND +@@ -64,6 +67,7 @@ struct _CcInfoOverviewPanel + CcListRow *graphics_row; + GtkListBox *hardware_box; + CcListRow *hardware_model_row; ++ GtkListBox *hostname_box; + GtkDialog *hostname_editor; + CcHostnameEntry *hostname_entry; + CcListRow *hostname_row; +@@ -701,6 +705,21 @@ info_overview_panel_setup_virt (CcInfoOverviewPanel *s + set_virtualization_label (self, g_variant_get_string (inner, NULL)); + } + ++static char * ++get_hostname_fallback (void) ++{ ++ char localhost[_POSIX_HOST_NAME_MAX + 1] = ""; ++ if (gethostname (localhost, _POSIX_HOST_NAME_MAX) == 0) ++ { ++ if (g_strcmp0 ((char *)localhost, "") > 0) ++ return (char *)localhost; ++ else ++ return "localhost"; ++ } ++ else ++ return "localhost"; ++} ++ + static const char * + get_windowing_system (void) + { +@@ -771,6 +790,8 @@ info_overview_panel_setup_overview (CcInfoOverviewPane + if (load_budgie_version (&budgie_version)) + cc_list_row_set_secondary_label (self->budgie_version_row, budgie_version); + ++ cc_list_row_set_secondary_label (self->hostname_row, get_hostname_fallback ()); ++ + cc_list_row_set_secondary_label (self->windowing_system_row, get_windowing_system ()); + + hardware_model_text = get_hardware_model_string (); +@@ -948,9 +969,7 @@ cc_info_panel_row_activated_cb (CcInfoOverviewPanel *s + g_assert (CC_IS_INFO_OVERVIEW_PANEL (self)); + g_assert (CC_IS_LIST_ROW (row)); + +- if (row == self->hostname_row) +- open_hostname_edit_dialog (self); +- else if (row == self->software_updates_row) ++ if (row == self->software_updates_row) + open_software_update (self); + } + +@@ -1018,6 +1037,7 @@ cc_info_overview_panel_class_init (CcInfoOverviewPanel + gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, graphics_row); + gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hardware_box); + gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hardware_model_row); ++ gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hostname_box); + gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hostname_editor); + gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hostname_entry); + gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hostname_row); diff --git a/sysutils/budgie-control-center/files/patch-panels_info-overview_cc-info-overview-panel.ui b/sysutils/budgie-control-center/files/patch-panels_info-overview_cc-info-overview-panel.ui new file mode 100644 index 000000000000..adbe74b033ce --- /dev/null +++ b/sysutils/budgie-control-center/files/patch-panels_info-overview_cc-info-overview-panel.ui @@ -0,0 +1,24 @@ +--- panels/info-overview/cc-info-overview-panel.ui.orig 2023-08-01 19:09:00 UTC ++++ panels/info-overview/cc-info-overview-panel.ui +@@ -37,10 +37,9 @@ + </child> + + <child> +- <object class="GtkListBox"> ++ <object class="GtkListBox" id="hostname_box"> + <property name="visible">True</property> + <property name="selection-mode">none</property> +- <signal name="row-activated" handler="cc_info_panel_row_activated_cb" swapped="yes"/> + <style> + <class name="content" /> + </style> +@@ -50,8 +49,7 @@ + <object class="CcListRow" id="hostname_row"> + <property name="visible">True</property> + <property name="title" translatable="yes">Device Name</property> +- <property name="secondary-label" bind-source="hostname_entry" bind-property="text" bind-flags="sync-create" /> +- <property name="icon-name">go-next-symbolic</property> ++ <property name="activatable">False</property> + </object> + </child> +