Skip to content

Commit

Permalink
removed unecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tlemy committed Feb 1, 2024
1 parent e603dfc commit 460fcc9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 44 deletions.
21 changes: 0 additions & 21 deletions xed/xed-settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,25 +322,6 @@ on_enable_tab_scrolling_changed (GSettings *settings,
}
}

static void
on_auto_close_changed (GSettings *settings,
const gchar *key,
XedSettings *xs)
{
const GList *windows;
gboolean enable;

enable = g_settings_get_boolean (settings, key);
windows = xed_app_get_main_windows (XED_APP (g_application_get_default ()));

while (windows != NULL)
{
xed_window_set_auto_close (windows->data, enable);

windows = g_list_next (windows);
}
}

static void
on_max_recents_changed (GSettings *settings,
const gchar *key,
Expand Down Expand Up @@ -416,8 +397,6 @@ xed_settings_init (XedSettings *xs)
G_CALLBACK (on_draw_whitespace_locations_or_types_changed), xs);
g_signal_connect (xs->priv->editor, "changed::draw-whitespace-newline",
G_CALLBACK (on_draw_whitespace_locations_or_types_changed), xs);
g_signal_connect (xs->priv->editor, "changed::auto-close",
G_CALLBACK (on_auto_close_changed), xs);

/* ui changes */
g_signal_connect (xs->priv->ui, "changed::enable-tab-scrolling",
Expand Down
22 changes: 0 additions & 22 deletions xed/xed-window.c
Original file line number Diff line number Diff line change
Expand Up @@ -4217,28 +4217,6 @@ xed_window_get_tab_from_location (XedWindow *window,
return ret;
}

/**
* xed_window_set_auto_close:
* @window: a #XedWindow
* @gboolean: a #gboolean
*
* Sets the auto_close switch.
* If the switch is set to true,
* the window closes once the last tab is closed.
*
* Return value: none
*/
void
xed_window_set_auto_close (XedWindow *window,
gboolean enable)
{
g_return_if_fail (XED_IS_WINDOW(window));

xed_debug (DEBUG_WINDOW);

g_settings_set_boolean (window->priv->editor_settings, XED_SETTINGS_AUTO_CLOSE, enable);
}

/**
* xed_window_get_message_bus:
* @window: a #XedWindow
Expand Down
1 change: 0 additions & 1 deletion xed/xed-window.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ void xed_window_close_all_tabs (XedWindow *window);
void xed_window_close_tabs (XedWindow *window, const GList *tabs);
XedTab *xed_window_get_active_tab (XedWindow *window);
void xed_window_set_active_tab (XedWindow *window, XedTab *tab);
void xed_window_set_auto_close (XedWindow *window, gboolean enable);

/* Helper functions */
XedView *xed_window_get_active_view (XedWindow *window);
Expand Down

0 comments on commit 460fcc9

Please sign in to comment.