summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-12-23 15:17:49 +0300
committermonsta <[email protected]>2017-12-23 15:17:49 +0300
commitd68834a740cb3ac396dea12f1d4cb73d309a240e (patch)
treeb4c7d07572f1fd2bed9a4b9062eb5f0be1418da1
parentd12302def2b23e124509f54afd0d9da49651d9f3 (diff)
downloadmate-control-center-d68834a740cb3ac396dea12f1d4cb73d309a240e.tar.bz2
mate-control-center-d68834a740cb3ac396dea12f1d4cb73d309a240e.tar.xz
libslab: remove more unused code
-rw-r--r--libslab/app-resizer.c7
-rw-r--r--libslab/app-shell.c3
-rw-r--r--libslab/libslab-utils.c30
-rw-r--r--libslab/libslab-utils.h2
-rw-r--r--libslab/shell-window.c9
-rw-r--r--libslab/slab-mate-util.h18
-rw-r--r--libslab/tile.c96
-rw-r--r--libslab/tile.h17
8 files changed, 0 insertions, 182 deletions
diff --git a/libslab/app-resizer.c b/libslab/app-resizer.c
index 228ceee1..d5b27dc6 100644
--- a/libslab/app-resizer.c
+++ b/libslab/app-resizer.c
@@ -180,7 +180,6 @@ app_resizer_set_table_cache (AppResizer * widget, GList * cache_list)
static void
app_resizer_size_allocate (GtkWidget * widget, GtkAllocation * allocation)
{
- /* printf("ENTER - app_resizer_size_allocate\n"); */
AppResizer *resizer = APP_RESIZER (widget);
GtkWidget *child = GTK_WIDGET (APP_RESIZER (resizer)->child);
GtkAllocation widget_allocation;
@@ -291,12 +290,6 @@ app_resizer_set_vadjustment_value (GtkWidget * widget, gdouble value)
static gboolean
app_resizer_paint_window (GtkWidget * widget, cairo_t * cr, AppShellData * app_data)
{
- /*
- printf("ENTER - app_resizer_paint_window\n");
- printf("Area: %d, %d, %d, %d\n", event->area.x, event->area.y, event->area.width, event->area.height);
- printf("Allocation:%d, %d, %d, %d\n\n", widget->allocation.x, widget->allocation.y, widget->allocation.width, widget->allocation.height);
- */
-
cairo_save(cr);
GtkAllocation widget_allocation;
diff --git a/libslab/app-shell.c b/libslab/app-shell.c
index 78e1b6a9..85934a7a 100644
--- a/libslab/app-shell.c
+++ b/libslab/app-shell.c
@@ -98,7 +98,6 @@ hide_shell (AppShellData * app_data)
{
gtk_window_get_position (GTK_WINDOW (app_data->main_app),
&app_data->main_app_window_x, &app_data->main_app_window_y);
- /* printf("x:%d, y:%d\n", app_data->main_app_window_x, app_data->main_app_window_y); */
/* clear the search bar now so reshowing is fast and flicker free - BNC#283186 */
application_launcher_clear_search_bar (app_data);
gtk_widget_hide (app_data->main_app);
@@ -1019,7 +1018,6 @@ check_specific_apps_hack (MateDesktopItem * item)
mate_desktop_item_get_string (item, MATE_DESKTOP_ITEM_CATEGORIES);
if (g_strrstr (categories, COMMAND_LINE_LOCKDOWN_DESKTOP_CATEGORY))
{
- /* printf ("eliminating %s\n", mate_desktop_item_get_location (item)); */
return TRUE;
}
}
@@ -1164,7 +1162,6 @@ generate_new_apps (AppShellData * app_data)
if (g_hash_table_lookup (new_apps_dups, uri))
{
/* if a desktop file is in 2 or more top level categories, only show it once */
- /* printf("Discarding Newapp duplicate:%s\n", uri); */
break;
}
g_hash_table_insert (new_apps_dups, (gpointer) uri, (gpointer) uri);
diff --git a/libslab/libslab-utils.c b/libslab/libslab-utils.c
index 622c99c7..5cb74b3f 100644
--- a/libslab/libslab-utils.c
+++ b/libslab/libslab-utils.c
@@ -13,9 +13,6 @@
#include <sys/time.h>
#include <gtk/gtk.h>
-#define DESKTOP_ITEM_TERMINAL_EMULATOR_FLAG "TerminalEmulator"
-#define ALTERNATE_DOCPATH_KEY "DocPath"
-
static FILE *checkpoint_file;
MateDesktopItem *
@@ -149,33 +146,6 @@ libslab_handle_g_error (GError **error, const gchar *msg_format, ...)
g_free (msg);
}
-static guint thumbnail_factory_idle_id;
-static MateDesktopThumbnailFactory *thumbnail_factory;
-
-static void
-create_thumbnail_factory (void)
-{
- /* The thumbnail_factory may already have been created by an applet
- * instance that was launched before the current one.
- */
- if (thumbnail_factory != NULL)
- return;
-
- libslab_checkpoint ("create_thumbnail_factory(): start");
-
- thumbnail_factory = mate_desktop_thumbnail_factory_new (MATE_DESKTOP_THUMBNAIL_SIZE_NORMAL);
-
- libslab_checkpoint ("create_thumbnail_factory(): end");
-}
-
-static gboolean
-init_thumbnail_factory_idle_cb (gpointer data)
-{
- create_thumbnail_factory ();
- thumbnail_factory_idle_id = 0;
- return FALSE;
-}
-
void
libslab_checkpoint (const char *format, ...)
{
diff --git a/libslab/libslab-utils.h b/libslab/libslab-utils.h
index b40290cf..8871ef77 100644
--- a/libslab/libslab-utils.h
+++ b/libslab/libslab-utils.h
@@ -4,8 +4,6 @@
#include <glib.h>
#include <gtk/gtk.h>
#include <libmate-desktop/mate-desktop-item.h>
-#define MATE_DESKTOP_USE_UNSTABLE_API 1
-#include <libmate-desktop/mate-desktop-thumbnail.h>
#ifdef __cplusplus
extern "C" {
diff --git a/libslab/shell-window.c b/libslab/shell-window.c
index 2e97a22f..b27cb5d8 100644
--- a/libslab/shell-window.c
+++ b/libslab/shell-window.c
@@ -97,15 +97,6 @@ shell_window_handle_size_request (GtkWidget * widget, GtkRequisition * requisiti
gtk_widget_get_preferred_size (GTK_WIDGET (APP_RESIZER (app_data->category_layout)->child), &child_requisiton, NULL);
- /*
- Fixme - counting on this being called after the real size request is done.
- seems to be that way but I don't know why. I would think I would need to explictly call it here first
- printf("Enter - shell_window_handle_size_request\n");
- printf("passed in width:%d, height:%d\n", requisition->width, requisition->height);
- printf("left side width:%d\n", SHELL_WINDOW(widget)->_left_pane->requisition.width);
- printf("right side width:%d\n", GTK_WIDGET(APP_RESIZER(app_data->category_layout)->child)->requisition.width);
- */
-
requisition->width += child_requisiton.width;
/* use the left side as a minimum height, if the right side is taller,
diff --git a/libslab/slab-mate-util.h b/libslab/slab-mate-util.h
index 02a8cd10..abe5c0d2 100644
--- a/libslab/slab-mate-util.h
+++ b/libslab/slab-mate-util.h
@@ -29,24 +29,6 @@
extern "C" {
#endif
-#define SLAB_APPLICATION_BROWSER_KEY "/desktop/mate/applications/main-menu/application_browser"
-#define SLAB_SYSTEM_LIST_KEY "/desktop/mate/applications/main-menu/system_list"
-#define SLAB_FILE_BROWSER_KEY "/desktop/mate/applications/main-menu/file_browser"
-#define SLAB_SYSTEM_MONITOR_KEY "/desktop/mate/applications/main-menu/system_monitor"
-#define SLAB_NETWORK_CONFIG_TOOL_KEY "/desktop/mate/applications/main-menu/network_config_tool"
-#define SLAB_NETWORK_CONFIG_TOOL_NM_KEY "/desktop/mate/applications/main-menu/network_config_tool_nm"
-#define SLAB_URGENT_CLOSE_KEY "/desktop/mate/applications/main-menu/urgent_close"
-#define SLAB_LOCK_SCREEN_PRIORITY_KEY "/desktop/mate/applications/main-menu/lock_screen_priority"
-#define SLAB_MAIN_MENU_REORDERING_KEY "/desktop/mate/applications/main-menu/main_menu_reordering"
-#define SLAB_UPGRADE_PACKAGE_KEY "/desktop/mate/applications/main-menu/upgrade_package_command"
-#define SLAB_UNINSTALL_PACKAGE_KEY "/desktop/mate/applications/main-menu/uninstall_package_command"
-#define SLAB_USER_SPECIFIED_APPS_KEY "/desktop/mate/applications/main-menu/file-area/user_specified_apps"
-#define SLAB_APPLICATION_USE_DB_KEY "/desktop/mate/applications/main-menu/file-area/app_use_db"
-#define SLAB_FILE_ITEM_LIMIT "/desktop/mate/applications/main-menu/file-area/item_limit"
-#define SLAB_FILE_BLACKLIST "/desktop/mate/applications/main-menu/file-area/file_blacklist"
-#define SLAB_FILE_MANAGER_OPEN_CMD "/desktop/mate/applications/main-menu/file-area/file_mgr_open_cmd"
-#define SLAB_FILE_SEND_TO_CMD "/desktop/mate/applications/main-menu/file-area/file_send_to_cmd"
-
MateDesktopItem *load_desktop_item_from_unknown (const gchar * id);
gboolean open_desktop_item_exec (MateDesktopItem * desktop_item);
diff --git a/libslab/tile.c b/libslab/tile.c
index e3343801..b2f483f7 100644
--- a/libslab/tile.c
+++ b/libslab/tile.c
@@ -58,8 +58,6 @@ static void tile_drag_begin (GtkWidget *, GdkDragContext *);
static void tile_drag_data_get (GtkWidget *, GdkDragContext *, GtkSelectionData *, guint,
guint);
-static void tile_emit_resource_event (Tile *, TileEventType, guint32);
-
static void tile_tile_action_triggered (Tile *, TileEvent *, TileAction *);
static void tile_action_triggered_event_marshal (GClosure *, GValue *, guint, const GValue *,
gpointer, gpointer);
@@ -71,8 +69,6 @@ typedef void (*marshal_func_VOID__POINTER_POINTER) (gpointer, gpointer, gpointer
enum
{
TILE_ACTIVATED_SIGNAL,
- TILE_IMPLICIT_ENABLE_SIGNAL,
- TILE_IMPLICIT_DISABLE_SIGNAL,
TILE_ACTION_TRIGGERED_SIGNAL,
LAST_SIGNAL
};
@@ -112,11 +108,7 @@ tile_class_init (TileClass * this_class)
button_class->leave = tile_leave;
button_class->clicked = tile_clicked;
- this_class->tile_explicit_enable = NULL;
- this_class->tile_explicit_disable = NULL;
this_class->tile_activated = NULL;
- this_class->tile_implicit_enable = NULL;
- this_class->tile_implicit_disable = NULL;
this_class->tile_action_triggered = tile_tile_action_triggered;
g_type_class_add_private (this_class, sizeof (TilePrivate));
@@ -135,18 +127,6 @@ tile_class_init (TileClass * this_class)
G_STRUCT_OFFSET (TileClass, tile_activated),
NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
- tile_signals[TILE_IMPLICIT_ENABLE_SIGNAL] = g_signal_new ("tile-implicit-enable",
- G_TYPE_FROM_CLASS (this_class),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (TileClass, tile_implicit_enable),
- NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- tile_signals[TILE_IMPLICIT_DISABLE_SIGNAL] = g_signal_new ("tile-implicit-disable",
- G_TYPE_FROM_CLASS (this_class),
- G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (TileClass, tile_implicit_disable),
- NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
-
tile_signals[TILE_ACTION_TRIGGERED_SIGNAL] = g_signal_new ("tile-action-triggered",
G_TYPE_FROM_CLASS (this_class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
@@ -498,82 +478,6 @@ tile_tile_action_triggered (Tile * tile, TileEvent * event, TileAction * action)
(*action->func) (tile, event, action);
}
-gint
-tile_compare (gconstpointer a, gconstpointer b)
-{
- if (IS_TILE (a) && IS_TILE (b))
- return strcmp (TILE (a)->uri, TILE (b)->uri);
-
- return a - b;
-}
-
-void
-tile_explicit_enable (Tile * this)
-{
- TileClass *this_class = TILE_GET_CLASS (this);
-
- if (this_class->tile_explicit_enable)
- (*this_class->tile_explicit_enable) (this);
-}
-
-void
-tile_explicit_disable (Tile * this)
-{
- TileClass *this_class = TILE_GET_CLASS (this);
-
- if (this_class->tile_explicit_disable)
- (*this_class->tile_explicit_disable) (this);
-}
-
-void
-tile_implicit_enable (Tile * tile)
-{
- tile_implicit_enable_with_time (tile, GDK_CURRENT_TIME);
-}
-
-void
-tile_implicit_disable (Tile * tile)
-{
- tile_implicit_disable_with_time (tile, GDK_CURRENT_TIME);
-}
-
-void
-tile_implicit_enable_with_time (Tile * tile, guint32 time)
-{
- tile_emit_resource_event (tile, TILE_EVENT_IMPLICIT_ENABLE, time);
-}
-
-void
-tile_implicit_disable_with_time (Tile * tile, guint32 time)
-{
- tile_emit_resource_event (tile, TILE_EVENT_IMPLICIT_DISABLE, time);
-}
-
-static void
-tile_emit_resource_event (Tile * tile, TileEventType type, guint32 time)
-{
- TileEvent *event;
- guint signal_id;
-
- event = g_new0 (TileEvent, 1);
- event->type = type;
- event->time = time;
-
- if (type == TILE_EVENT_IMPLICIT_ENABLE)
- {
- signal_id = tile_signals[TILE_IMPLICIT_ENABLE_SIGNAL];
- tile->enabled = TRUE;
- }
- else
- {
- signal_id = tile_signals[TILE_IMPLICIT_DISABLE_SIGNAL];
- tile->enabled = FALSE;
- }
-
- g_signal_emit (tile, signal_id, 0, event);
- g_free (event);
-}
-
void
tile_trigger_action (Tile * tile, TileAction * action)
{
diff --git a/libslab/tile.h b/libslab/tile.h
index f105a1d2..985b876c 100644
--- a/libslab/tile.h
+++ b/libslab/tile.h
@@ -57,8 +57,6 @@ typedef enum
TILE_EVENT_ACTIVATED_SINGLE_CLICK,
TILE_EVENT_ACTIVATED_DOUBLE_CLICK,
TILE_EVENT_ACTIVATED_KEYBOARD,
- TILE_EVENT_IMPLICIT_DISABLE,
- TILE_EVENT_IMPLICIT_ENABLE,
TILE_EVENT_ACTION_TRIGGERED
} TileEventType;
@@ -87,12 +85,7 @@ struct _TileClass
{
GtkButtonClass gtk_button_class;
- void (*tile_explicit_enable) (Tile *);
- void (*tile_explicit_disable) (Tile *);
-
void (*tile_activated) (Tile *, TileEvent *);
- void (*tile_implicit_enable) (Tile *, TileEvent *);
- void (*tile_implicit_disable) (Tile *, TileEvent *);
void (*tile_action_triggered) (Tile *, TileEvent *, TileAction *);
};
@@ -122,16 +115,6 @@ struct _TileEvent
GType tile_get_type (void);
GType tile_action_get_type (void);
-gint tile_compare (gconstpointer a, gconstpointer b);
-
-void tile_explicit_enable (Tile * tile);
-void tile_explicit_disable (Tile * tile);
-
-void tile_implicit_enable (Tile * tile);
-void tile_implicit_disable (Tile * tile);
-void tile_implicit_enable_with_time (Tile * tile, guint32 time);
-void tile_implicit_disable_with_time (Tile * tile, guint32 time);
-
void tile_trigger_action (Tile * tile, TileAction * action);
void tile_trigger_action_with_time (Tile * tile, TileAction * action, guint32 time);