本文整理汇总了C++中pluma_debug函数的典型用法代码示例。如果您正苦于以下问题:C++ pluma_debug函数的具体用法?C++ pluma_debug怎么用?C++ pluma_debug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pluma_debug函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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");
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
}