本文整理汇总了C++中pluma_debug函数的典型用法代码示例。如果您正苦于以下问题:C++ pluma_debug函数的具体用法?C++ pluma_debug怎么用?C++ pluma_debug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pluma_debug函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: pluma_plugins_engine_deactivate_plugins
void
pluma_plugins_engine_deactivate_plugins (PlumaPluginsEngine *engine,
PlumaWindow *window)
{
GList *pl;
pluma_debug (DEBUG_PLUGINS);
g_return_if_fail (PLUMA_IS_PLUGINS_ENGINE (engine));
g_return_if_fail (PLUMA_IS_WINDOW (window));
for (pl = engine->priv->plugin_list; pl; pl = pl->next)
{
PlumaPluginInfo *info = (PlumaPluginInfo*)pl->data;
/* check if the plugin is actually active */
if (!pluma_plugin_info_is_active (info))
continue;
/* call deactivate for the plugin for this window */
pluma_plugin_deactivate (info->plugin, window);
}
pluma_debug_message (DEBUG_PLUGINS, "End");
}
开发者ID:jinguoliang,项目名称:mate-text-editor,代码行数:25,代码来源:pluma-plugins-engine.c
示例2: pluma_plugins_engine_finalize
static void
pluma_plugins_engine_finalize (GObject *object)
{
PlumaPluginsEngine *engine = PLUMA_PLUGINS_ENGINE (object);
GList *item;
pluma_debug (DEBUG_PLUGINS);
/* Firs deactivate all plugins */
for (item = engine->priv->plugin_list; item; item = item->next)
{
PlumaPluginInfo *info = PLUMA_PLUGIN_INFO (item->data);
if (pluma_plugin_info_is_active (info))
pluma_plugins_engine_deactivate_plugin_real (engine, info);
}
/* unref the loaders */
g_hash_table_destroy (engine->priv->loaders);
/* and finally free the infos */
for (item = engine->priv->plugin_list; item; item = item->next)
{
PlumaPluginInfo *info = PLUMA_PLUGIN_INFO (item->data);
_pluma_plugin_info_unref (info);
}
g_list_free (engine->priv->plugin_list);
G_OBJECT_CLASS (pluma_plugins_engine_parent_class)->finalize (object);
}
开发者ID:jinguoliang,项目名称:mate-text-editor,代码行数:32,代码来源:pluma-plugins-engine.c
示例3: pluma_plugins_engine_get_plugin_list
const GList *
pluma_plugins_engine_get_plugin_list (PlumaPluginsEngine *engine)
{
pluma_debug (DEBUG_PLUGINS);
return engine->priv->plugin_list;
}
开发者ID:jinguoliang,项目名称:mate-text-editor,代码行数:7,代码来源:pluma-plugins-engine.c
示例4: impl_activate
static void
impl_activate (PlumaPlugin *plugin,
PlumaWindow *window)
{
SoupMessage *msg;
WindowData *data;
pluma_debug (DEBUG_PLUGINS);
data = g_slice_new (WindowData);
data->plugin = PLUMA_CHECK_UPDATE_PLUGIN (plugin);
data->url = NULL;
data->version = NULL;
g_object_set_data_full (G_OBJECT (window),
WINDOW_DATA_KEY,
data,
free_window_data);
msg = soup_message_new ("GET", PLUMA_URL);
soup_session_queue_message (PLUMA_CHECK_UPDATE_PLUGIN (plugin)->priv->session, msg,
(SoupSessionCallback)parse_page_version,
window);
}
开发者ID:drewwalton19216801,项目名称:mate-text-editor,代码行数:25,代码来源:pluma-check-update-plugin.c
示例5: pluma_plugins_engine_init
static void
pluma_plugins_engine_init (PlumaPluginsEngine *engine)
{
pluma_debug (DEBUG_PLUGINS);
if (!g_module_supported ())
{
g_warning ("pluma is not able to initialize the plugins engine.");
return;
}
engine->priv = G_TYPE_INSTANCE_GET_PRIVATE (engine,
PLUMA_TYPE_PLUGINS_ENGINE,
PlumaPluginsEnginePrivate);
load_all_plugins (engine);
/* make sure that the first reactivation will read active plugins
from the prefs */
engine->priv->activate_from_prefs = TRUE;
/* mapping from loadername -> loader object */
engine->priv->loaders = g_hash_table_new_full (hash_lowercase,
equal_lowercase,
(GDestroyNotify)g_free,
(GDestroyNotify)loader_destroy);
}
开发者ID:jinguoliang,项目名称:mate-text-editor,代码行数:27,代码来源:pluma-plugins-engine.c
示例6: impl_activate
static void
impl_activate (PlumaPlugin *plugin,
PlumaWindow *window)
{
WindowData *data;
GList *views;
GList *item;
pluma_debug (DEBUG_PLUGINS);
data = g_slice_new (WindowData);
g_object_set_data_full (G_OBJECT (window),
WINDOW_DATA_KEY,
data,
(GDestroyNotify) free_window_data);
views = pluma_window_get_views (window);
for (item = views; item != NULL; item = item->next)
{
enable_bookmarks (PLUMA_VIEW (item->data), plugin);
load_bookmark_metadata (PLUMA_VIEW (item->data));
}
g_list_free (views);
g_signal_connect (window, "tab-added",
G_CALLBACK (on_tab_added), plugin);
g_signal_connect (window, "tab-removed",
G_CALLBACK (on_tab_removed), plugin);
install_menu (window);
install_messages (window);
}
开发者ID:danmcgoo,项目名称:pluma-plugins,代码行数:34,代码来源:pluma-bookmarks-plugin.c
示例7: pluma_debug
static void
impl_deactivate (PlumaPlugin *plugin,
PlumaWindow *window)
{
WindowData *data;
GList *views;
GList *item;
pluma_debug (DEBUG_PLUGINS);
uninstall_menu (window);
uninstall_messages (window);
views = pluma_window_get_views (window);
for (item = views; item != NULL; item = item->next)
{
disable_bookmarks (PLUMA_VIEW (item->data));
}
g_list_free (views);
data = BOOKMARKS_DATA (window);
g_return_if_fail (data != NULL);
g_signal_handlers_disconnect_by_func (window, on_tab_added, plugin);
g_signal_handlers_disconnect_by_func (window, on_tab_removed, plugin);
g_object_set_data (G_OBJECT (window), WINDOW_DATA_KEY, NULL);
}
开发者ID:danmcgoo,项目名称:pluma-plugins,代码行数:30,代码来源:pluma-bookmarks-plugin.c
示例8: docinfo_real
static void
docinfo_real (PlumaDocument *doc,
DocInfoDialog *dialog)
{
GtkTextIter start, end;
gint words = 0;
gint chars = 0;
gint white_chars = 0;
gint lines = 0;
gint bytes = 0;
gchar *tmp_str;
gchar *doc_name;
pluma_debug (DEBUG_PLUGINS);
gtk_text_buffer_get_bounds (GTK_TEXT_BUFFER (doc),
&start,
&end);
lines = gtk_text_buffer_get_line_count (GTK_TEXT_BUFFER (doc));
calculate_info (doc,
&start, &end,
&chars, &words, &white_chars, &bytes);
if (chars == 0)
lines = 0;
pluma_debug_message (DEBUG_PLUGINS, "Chars: %d", chars);
pluma_debug_message (DEBUG_PLUGINS, "Lines: %d", lines);
pluma_debug_message (DEBUG_PLUGINS, "Words: %d", words);
pluma_debug_message (DEBUG_PLUGINS, "Chars non-space: %d", chars - white_chars);
pluma_debug_message (DEBUG_PLUGINS, "Bytes: %d", bytes);
doc_name = pluma_document_get_short_name_for_display (doc);
tmp_str = g_strdup_printf ("<span weight=\"bold\">%s</span>", doc_name);
gtk_label_set_markup (GTK_LABEL (dialog->file_name_label), tmp_str);
g_free (doc_name);
g_free (tmp_str);
tmp_str = g_strdup_printf("%d", lines);
gtk_label_set_text (GTK_LABEL (dialog->lines_label), tmp_str);
g_free (tmp_str);
tmp_str = g_strdup_printf("%d", words);
gtk_label_set_text (GTK_LABEL (dialog->words_label), tmp_str);
g_free (tmp_str);
tmp_str = g_strdup_printf("%d", chars);
gtk_label_set_text (GTK_LABEL (dialog->chars_label), tmp_str);
g_free (tmp_str);
tmp_str = g_strdup_printf("%d", chars - white_chars);
gtk_label_set_text (GTK_LABEL (dialog->chars_ns_label), tmp_str);
g_free (tmp_str);
tmp_str = g_strdup_printf("%d", bytes);
gtk_label_set_text (GTK_LABEL (dialog->bytes_label), tmp_str);
g_free (tmp_str);
}
开发者ID:drewwalton19216801,项目名称:mate-text-editor,代码行数:60,代码来源:pluma-docinfo-plugin.c
示例9: pluma_plugins_engine_configure_plugin
void
pluma_plugins_engine_configure_plugin (PlumaPluginsEngine *engine,
PlumaPluginInfo *info,
GtkWindow *parent)
{
GtkWidget *conf_dlg;
GtkWindowGroup *wg;
pluma_debug (DEBUG_PLUGINS);
g_return_if_fail (info != NULL);
conf_dlg = pluma_plugin_create_configure_dialog (info->plugin);
g_return_if_fail (conf_dlg != NULL);
gtk_window_set_transient_for (GTK_WINDOW (conf_dlg),
parent);
wg = gtk_window_get_group (parent);
if (wg == NULL)
{
wg = gtk_window_group_new ();
gtk_window_group_add_window (wg, parent);
}
gtk_window_group_add_window (wg,
GTK_WINDOW (conf_dlg));
gtk_window_set_modal (GTK_WINDOW (conf_dlg), TRUE);
gtk_widget_show (conf_dlg);
}
开发者ID:jinguoliang,项目名称:mate-text-editor,代码行数:31,代码来源:pluma-plugins-engine.c
示例10: pluma_plugins_engine_active_plugins_changed
void
pluma_plugins_engine_active_plugins_changed (PlumaPluginsEngine *engine)
{
gboolean to_activate;
GSList *active_plugins;
GList *pl;
pluma_debug (DEBUG_PLUGINS);
active_plugins = pluma_prefs_manager_get_active_plugins ();
for (pl = engine->priv->plugin_list; pl; pl = pl->next)
{
PlumaPluginInfo *info = (PlumaPluginInfo*)pl->data;
if (!pluma_plugin_info_is_available (info))
continue;
to_activate = (g_slist_find_custom (active_plugins,
pluma_plugin_info_get_module_name (info),
(GCompareFunc)strcmp) != NULL);
if (!pluma_plugin_info_is_active (info) && to_activate)
g_signal_emit (engine, signals[ACTIVATE_PLUGIN], 0, info);
else if (pluma_plugin_info_is_active (info) && !to_activate)
g_signal_emit (engine, signals[DEACTIVATE_PLUGIN], 0, info);
}
g_slist_foreach (active_plugins, (GFunc) g_free, NULL);
g_slist_free (active_plugins);
}
开发者ID:jinguoliang,项目名称:mate-text-editor,代码行数:31,代码来源:pluma-plugins-engine.c
示例11: pluma_document_saver_save
void
pluma_document_saver_save (PlumaDocumentSaver *saver,
GTimeVal *old_mtime)
{
pluma_debug (DEBUG_SAVER);
g_return_if_fail (PLUMA_IS_DOCUMENT_SAVER (saver));
g_return_if_fail (saver->uri != NULL && strlen (saver->uri) > 0);
g_return_if_fail (saver->used == FALSE);
saver->used = TRUE;
// CHECK:
// - sanity check a max len for the uri?
// report async (in an idle handler) or sync (bool ret)
// async is extra work here, sync is special casing in the caller
/* never keep backup of autosaves */
if ((saver->flags & PLUMA_DOCUMENT_SAVE_PRESERVE_BACKUP) != 0)
saver->keep_backup = FALSE;
else
saver->keep_backup = pluma_prefs_manager_get_create_backup_copy ();
PLUMA_DOCUMENT_SAVER_GET_CLASS (saver)->save (saver, old_mtime);
}
开发者ID:jinguoliang,项目名称:mate-text-editor,代码行数:25,代码来源:pluma-document-saver.c
示例12: PLUMA_DRAWSPACES_PLUGIN
static void
impl_deactivate (PlumaPlugin *plugin,
PlumaWindow *window)
{
PlumaDrawspacesPlugin *ds_plugin = PLUMA_DRAWSPACES_PLUGIN (plugin);
GtkUIManager *manager;
WindowData *data;
pluma_debug (DEBUG_PLUGINS);
data = (WindowData *) g_object_get_data (G_OBJECT (window),
WINDOW_DATA_KEY);
g_return_if_fail (data != NULL);
manager = pluma_window_get_ui_manager (window);
data->enable = FALSE;
draw_spaces_in_window (window, ds_plugin);
g_signal_handlers_disconnect_by_func (window, tab_added_cb, ds_plugin);
gtk_ui_manager_remove_ui (manager, data->ui_id);
gtk_ui_manager_remove_action_group (manager, data->action_group);
g_object_set_data (G_OBJECT (window), WINDOW_DATA_KEY, NULL);
}
开发者ID:cibyr,项目名称:mate-text-editor-plugins,代码行数:26,代码来源:pluma-drawspaces-plugin.c
示例13: pluma_prefs_manager_bracket_matching_changed
static void
pluma_prefs_manager_bracket_matching_changed (GSettings *settings,
gchar *key,
gpointer user_data)
{
pluma_debug (DEBUG_PREFS);
if (strcmp (key, GPM_BRACKET_MATCHING) == 0)
{
gboolean enable;
GList *docs;
GList *l;
enable = g_settings_get_boolean (settings, key);
docs = pluma_app_get_documents (pluma_app_get_default ());
l = docs;
while (l != NULL)
{
gtk_source_buffer_set_highlight_matching_brackets (GTK_SOURCE_BUFFER (l->data),
enable);
l = l->next;
}
g_list_free (docs);
}
}
开发者ID:mate-desktop,项目名称:pluma,代码行数:29,代码来源:pluma-prefs-manager-app.c
示例14: pluma_prefs_manager_line_numbers_changed
static void
pluma_prefs_manager_line_numbers_changed (GSettings *settings,
gchar *key,
gpointer user_data)
{
pluma_debug (DEBUG_PREFS);
if (strcmp (key, GPM_DISPLAY_LINE_NUMBERS) == 0)
{
gboolean dln;
GList *views;
GList *l;
dln = g_settings_get_boolean (settings, key);
views = pluma_app_get_views (pluma_app_get_default ());
l = views;
while (l != NULL)
{
gtk_source_view_set_show_line_numbers (GTK_SOURCE_VIEW (l->data),
dln);
l = l->next;
}
g_list_free (views);
}
}
开发者ID:mate-desktop,项目名称:pluma,代码行数:29,代码来源:pluma-prefs-manager-app.c
示例15: pluma_prefs_manager_hl_current_line_changed
static void
pluma_prefs_manager_hl_current_line_changed (GSettings *settings,
gchar *key,
gpointer user_data)
{
pluma_debug (DEBUG_PREFS);
if (strcmp (key, GPM_HIGHLIGHT_CURRENT_LINE) == 0)
{
gboolean hl;
GList *views;
GList *l;
hl = g_settings_get_boolean (settings, key);
views = pluma_app_get_views (pluma_app_get_default ());
l = views;
while (l != NULL)
{
gtk_source_view_set_highlight_current_line (GTK_SOURCE_VIEW (l->data),
hl);
l = l->next;
}
g_list_free (views);
}
}
开发者ID:mate-desktop,项目名称:pluma,代码行数:29,代码来源:pluma-prefs-manager-app.c
示例16: pluma_prefs_manager_lockdown_changed
static void
pluma_prefs_manager_lockdown_changed (GSettings *settings,
gchar *key,
gpointer user_data)
{
PlumaApp *app;
gboolean locked;
pluma_debug (DEBUG_PREFS);
locked = g_settings_get_boolean (settings, key);
app = pluma_app_get_default ();
if (strcmp (key, GPM_LOCKDOWN_COMMAND_LINE) == 0)
_pluma_app_set_lockdown_bit (app,
PLUMA_LOCKDOWN_COMMAND_LINE,
locked);
else if (strcmp (key, GPM_LOCKDOWN_PRINTING) == 0)
_pluma_app_set_lockdown_bit (app,
PLUMA_LOCKDOWN_PRINTING,
locked);
else if (strcmp (key, GPM_LOCKDOWN_PRINT_SETUP) == 0)
_pluma_app_set_lockdown_bit (app,
PLUMA_LOCKDOWN_PRINT_SETUP,
locked);
else if (strcmp (key, GPM_LOCKDOWN_SAVE_TO_DISK) == 0)
_pluma_app_set_lockdown_bit (app,
PLUMA_LOCKDOWN_SAVE_TO_DISK,
locked);
}
开发者ID:mate-desktop,项目名称:pluma,代码行数:34,代码来源:pluma-prefs-manager-app.c
示例17: pluma_prefs_manager_wrap_mode_changed
static void
pluma_prefs_manager_wrap_mode_changed (GSettings *settings,
gchar *key,
gpointer user_data)
{
pluma_debug (DEBUG_PREFS);
if (strcmp (key, GPM_WRAP_MODE) == 0)
{
GtkWrapMode wrap_mode;
GList *views;
GList *l;
wrap_mode = get_wrap_mode_from_string (g_settings_get_string(settings, key));
views = pluma_app_get_views (pluma_app_get_default ());
l = views;
while (l != NULL)
{
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (l->data),
wrap_mode);
l = l->next;
}
g_list_free (views);
}
}
开发者ID:mate-desktop,项目名称:pluma,代码行数:29,代码来源:pluma-prefs-manager-app.c
示例18: pluma_prefs_manager_search_hl_enable_changed
static void
pluma_prefs_manager_search_hl_enable_changed (GSettings *settings,
gchar *key,
gpointer user_data)
{
pluma_debug (DEBUG_PREFS);
if (strcmp (key, GPM_SEARCH_HIGHLIGHTING_ENABLE) == 0)
{
gboolean enable;
GList *docs;
GList *l;
enable = g_settings_get_boolean (settings, key);
docs = pluma_app_get_documents (pluma_app_get_default ());
l = docs;
while (l != NULL)
{
g_return_if_fail (PLUMA_IS_DOCUMENT (l->data));
pluma_document_set_enable_search_highlighting (PLUMA_DOCUMENT (l->data),
enable);
l = l->next;
}
g_list_free (docs);
}
}
开发者ID:mate-desktop,项目名称:pluma,代码行数:31,代码来源:pluma-prefs-manager-app.c
示例19: pluma_prefs_manager_max_recents_changed
static void
pluma_prefs_manager_max_recents_changed (GSettings *settings,
gchar *key,
gpointer user_data)
{
pluma_debug (DEBUG_PREFS);
if (strcmp (key, GPM_MAX_RECENTS) == 0)
{
const GList *windows;
gint max;
max = g_settings_get_int (settings, key);
if (max < 0) {
max = GPM_DEFAULT_MAX_RECENTS;
}
windows = pluma_app_get_windows (pluma_app_get_default ());
while (windows != NULL)
{
PlumaWindow *w = windows->data;
gtk_recent_chooser_set_limit (GTK_RECENT_CHOOSER (w->priv->toolbar_recent_menu),
max);
windows = g_list_next (windows);
}
/* FIXME: we have no way at the moment to trigger the
* update of the inline recents in the File menu */
}
}
开发者ID:mate-desktop,项目名称:pluma,代码行数:33,代码来源:pluma-prefs-manager-app.c
示例20: pluma_prefs_manager_smart_home_end_changed
static void
pluma_prefs_manager_smart_home_end_changed (GSettings *settings,
gchar *key,
gpointer user_data)
{
pluma_debug (DEBUG_PREFS);
if (strcmp (key, GPM_SMART_HOME_END) == 0)
{
GtkSourceSmartHomeEndType smart_he;
GList *views;
GList *l;
smart_he = get_smart_home_end_from_string (g_settings_get_string (settings, key));
views = pluma_app_get_views (pluma_app_get_default ());
l = views;
while (l != NULL)
{
gtk_source_view_set_smart_home_end (GTK_SOURCE_VIEW (l->data),
smart_he);
l = l->next;
}
g_list_free (views);
}
}
开发者ID:mate-desktop,项目名称:pluma,代码行数:29,代码来源:pluma-prefs-manager-app.c
注:本文中的pluma_debug函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论