Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:SRagavan
pidgin
pidgin-dbus.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pidgin-dbus.diff of Package pidgin
diff -up libpurple/plugins/dbus-example.c ../../pidgin-2.0.2/libpurple/plugins/dbus-example.c --- libpurple/plugins/dbus-example.c 2007-06-15 08:41:52.000000000 +0530 +++ ../../pidgin-2.0.2/libpurple/plugins/dbus-example.c 2007-06-27 13:27:43.000000000 +0530 @@ -40,6 +40,7 @@ #include "blist.h" #include "notify.h" #include "plugin.h" +#include "prefs.h" #include "version.h" #include <stdio.h> @@ -66,8 +67,12 @@ PURPLE_DBUS_DEFINE_TYPE(PurpleText) (PurpleBuddy) as well as the types defined in the plugin (PurpleText). */ DBUS_EXPORT PurpleText* dbus_example_get_hello_object(void); DBUS_EXPORT void dbus_example_set_text(PurpleText *obj, const char *text); +DBUS_EXPORT gboolean dbus_example_get_mute(void); +DBUS_EXPORT void dbus_example_set_mute(gboolean mute); +DBUS_EXPORT void dbus_example_set_log(gboolean mute); DBUS_EXPORT const char *dbus_example_get_text(PurpleText *obj); DBUS_EXPORT const char *dbus_example_get_buddy_name(PurpleBuddy *buddy); +DBUS_EXPORT void dbus_example_reload_prefs (void); /* This file has been generated by the #dbus-analize-functions.py script. It contains dbus wrappers for the four functions declared @@ -83,6 +88,53 @@ PurpleText* dbus_example_get_hello_objec return &hello; } +void dbus_example_reload_prefs (void) +{ + printf ("loading %d\n", purple_prefs_load ()); + return; +} + +void dbus_example_set_mute (gboolean bool) +{ + static int unloaded = 0; + + purple_prefs_set_bool ("/pidgin/sound/mute", bool); + purple_prefs_set_string ("/pidgin/conversations/im/hide_new", bool ? "always":"never"); + if (bool) { + // unload + PurplePlugin *p = purple_plugins_find_with_id ("gtk-amc_grim-Guifications"); + if (p) { + unloaded = 1; + purple_plugin_unload (p); + } + } else { + PurplePlugin *p = purple_plugins_find_with_id ("gtk-amc_grim-Guifications"); + if (p && unloaded) { + unloaded = 0; + purple_plugin_load (p); + } + } + //printf("get %d\n", "/plugins/gtk/amc_grim/guifications2/behavior/display_time"); + //purple_prefs_set_int ("/plugins/gtk/amc_grim/guifications2/behavior/display_time", bool ? 0 : 6); + //printf("get %d\n", "/plugins/gtk/amc_grim/guifications2/behavior/display_time"); + + return; +} + +gboolean dbus_example_get_mute (void) +{ + return purple_prefs_get_bool ("/pidgin/sound/mute"); +} + +void dbus_example_set_log (gboolean bool) +{ + purple_prefs_set_bool ("/purple/logging/log_ims", bool); + purple_prefs_set_bool ("/purple/logging/log_chats", bool); + purple_prefs_set_bool ("/purple/logging/log_system", bool); + + return; +} + void dbus_example_set_text(PurpleText *obj, const char *text) { if (obj != NULL) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor